Client

Client

new Client(opts)

Parameters:
Name Type Description
opts ClientOptions
Source:

Members

bots :Store

Cached bots, mapped by their ID.
Type:
  • Store
Source:

options :ClientOptions

The ClientOptions of the Client.
Type:
Source:

users :Store

Cached users, mapped by their ID.
Type:
  • Store
Source:

Methods

(async) fetchBot(idopt, optionsopt) → {Bot}

Fetches a bot that is listed on Bots for Discord.
Parameters:
Name Type Attributes Default Description
id string <optional>
this.options.botID The Discord ID of a bot to fetch from.
options FetchOptions <optional>
{} Options to pass.
Source:
Returns:
Type
Bot

(async) fetchBotsOfUser(id) → {Array.<string>}

Fetches the bot IDs of a user.
Parameters:
Name Type Description
id string The Discord ID of a user to fetch owned bot IDs from.
Source:
Returns:
Type
Array.<string>

(async) fetchUpvotes(idopt, botTokenopt) → {VoteContents}

Fetches a Bot's Upvotes.
Parameters:
Name Type Attributes Default Description
id string <optional>
this.options.botID The Discord ID of a bot to fetch votes from.
botToken string <optional>
this.options.botToken The bot's API token from Bots for Discord.
Source:
Returns:
Type
VoteContents

(async) fetchUser(id, optionsopt) → {User}

Fetches a user on Bots for Discord.
Parameters:
Name Type Attributes Default Description
id string The Discord ID of a user to fetch from.
options FetchOptions <optional>
{} Options to pass.
Source:
Returns:
Type
User

(async) postCount(idopt, optionsopt) → {object}

Posts guild count for a bot.
Parameters:
Name Type Attributes Default Description
id string | number | PostOptions <optional>
this.options.botID The ID of the Bot to post guild count of. * This can also be PostOptions if `this.options.botID` is defined. * This can also be a number for PostOptions#guildCount (Overrides options#guildCount if so.)
options PostOptions | number <optional>
{} Options to pass. * This can also be a number for PostOptions#guildCount (Requires `this.options.botToken` be present)
Source:
Returns:
Type
object