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

Getting Bot Info

iDerp edited this page Mar 27, 2018 · 1 revision

How to get info of a specific bot:

First, start by firing off the getBotInfo event and supplying an ID.

let botInfo = await dbw.getBotInfo(BotID)

The function must be awaited or you can use a promise

dbw.getBotInfo(BotID).then(botInfo => {})

This will return a whole assortment of data. To get the information, just grab it from the function like so:

botInfo.avatar; // Returns the bot avatar URL.
botInfo.id; // Returns the bot ID.
botInfo.name; // Returns the name of the bot (ex: DerpBot).
botInfo.library; // Returns the library of the bot (ex: discord.js).
botInfo.tag; // Returns the tag of the bot (ex: DerpBot#2015).
botInfo.invite; // Returns the invite url for the bot.
botInfo.owner.username; // Returns the name of the bot owner (ex: iDerp).
botInfo.owner.tag; // Returns the tag of the bot owner (ex: iDerp#2015).
botInfo.owner.id; // Returns the id of the bot owner.
botInfo.prefix; // Returns the prefix of the bot.
botInfo.short_description; // Returns the short desc of the bot.
botInfo.description; // Returns the full description of the bot.
botInfo.stats.likes; // Returns the like count of the bot (ex: 3).
botInfo.stats.shards; // Returns the shard count of the bot (ex: 2).
botInfo.stats.guilds; // Returns the guild count of the bot (ex: 1337).
botInfo.discord; // Returns the support server for the bot.
botInfo.donation; // Returns the donation page for the bot (ex: DerpBot).
botInfo.website; // Returns the website for the bot (ex: DerpBot).

Lets say the bot doesn't have any website info posted on DBW, botStats.website would instead simply return a null.

Clone this wiki locally