Global

Type Definitions

ClientOptions

The options supplied on instantiating the client.
Type:
  • object
Properties:
Name Type Attributes Default Description
botToken string <optional>
null The bot's API token from the site. Required for some endpoints.
botID string <optional>
null The bot's ID.
cache boolean <optional>
false Whether or not to cache bots/users on fetch.
statsLimit number <optional>
3 The limit on the number of cached Statistics in Client#stats
version number <optional>
1 The default version of the API to use when fetching and posting.
Source:

FetchOptions

Options available to pass when fetching something, etc. a bot.
Type:
  • object
Properties:
Name Type Attributes Default Description
cache boolean <optional>
this.options.cache When set to true, caches the fetched object into a Store/Set value. Corrosponds to ClientOptions#cache when not present.
version boolean <optional>
this.options.version The version to use to fetch an endpoint. Corrosponds to ClientOptions#version when not present.
raw boolean <optional>
false When set to true, returns the raw fetched object.
botToken string <optional>
this.options.botToken One of your bot's authorization token from the site. Corrosponds to ClientOptions#botToken when not present.
Source:

MultiFetchOptions

Options when a given output is an array.
Type:
  • object
Properties:
Name Type Attributes Default Description
cache boolean <optional>
this.options.cache When set to true, caches the fetched object into a Store/Set value. Corrosponds to ClientOptions#cache when not present while fetching.
raw boolean <optional>
false When set to true, returns the raw fetched object.
version boolean <optional>
this.options.version The API version to use for GETting. Corrosponds to ClientOptions#version when not present.
mapify boolean <optional>
true When set to true, the fetched value will be in a Store, mapped by their IDs
botToken string <optional>
this.options.botToken One of your bot's authorization token from the site. The token should be related to the bot ID of fetch. Uses ClientOptions#botToken if omitted.
page number <optional>
1 The section of the endpoint to take.
Source:

PostOptions

Options when POSTing bot count.
Type:
  • object
Properties:
Name Type Attributes Default Description
countOrShards number | Array.<number> <optional>
null The server count/array of shards that the bot currently has.
botToken string <optional>
this.options.botToken The bot authorization token to use for authenticating the POST. The token should be related to the bot ID of POST. Uses ClientOptions#botToken if omitted.
version boolean <optional>
this.options.version The API version to use for POSTing. Corrosponds to ClientOptions#version when not present.
Source: