Skip to content
This repository was archived by the owner on Jan 28, 2019. It is now read-only.

Get all bots

iDerp edited this page Mar 27, 2018 · 1 revision

This is very easy.

All you need to do is run the following without any args.

dbw.getAllBots()

But! Make sure you either await it or use a promise.

// await
let dbwBots = await dbw.getAllBots()

// promise
dbw.getAllBots().then(dbwBots => {})

The function will then return an array of all the bots. An example of an array entry is as follows.

[
    {
        "avatar": "https://cdn.discordapp.com/avatars/339817292659425281/c11c9a9a15450192de1349e903c9ae9f",
        "id": "339817292659425281",
        "name": "DerpBot",
        "tag": "DerpBot#2015",
        "invite": "https://derpbot.us/invite",
        "owner": {
            "name": "iDerp",
            "tag": "iDerp#3616",
            "id": "159074350350336000"
        },
        "prefix": "d or Custom",
        "short_description": "HQ Audio | Multipurpose Bot",
        "description": "<style>\r\n.derpbotWebsite {\r\n\tposition: relative;\r\n\tpadding-bottom: 56.25%; /* 16:9 */\r\n\tpadding-top: 25px;\r\n\theight: 0;\r\n}\r\n.derpbotWebsite object,\r\n.derpbotWebsite embed {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n</style>\r\n<div class=\"derpbotWebsite\">\r\n<object data=\"https://derpbot.us/commands\"></object>\r\n</div>\r\n<center>\r\n<img src=\"https://derpbot.us/api/dbw/bot/339817292659425281/widget\">\r\n</center>",
        "stats": {
            "likes": 4,
            "shards": 2,
            "guilds": 1319
        },
        "discord": "https://derpbot.us/discord",
        "donation": "https://www.patreon.com/derpbot",
        "website": "https://derpbot.us"
    }
]

Getting info using this is not recommended and is for more experienced users.

Clone this wiki locally