Client

Constructor

new Discord.Client({
  token: "",
  [ autorun: false,]
  [ messageCacheLimit: 50,]
  [ shard: [0, 2] ]
});
  • (required) token: Your account token, follow the link at the beginning of the documentation to acquire one.
  • (optional) autorun: If true, the client will start to connect as soon as it's constructed, otherwise you have to call client.connect(). Defaults to false.
  • (optional) messageCacheLimit: The amount of messages (per channel) the library holds in the background, used mainly to get a message's last details prior to a message update. Set to 0 for no cache, or null for an unlimited cache. Defaults to 50.
  • (optional) shard: Allows sharding of the account, used for horizontal scaling. The first number is the shard ID, the second number is the amount of shards. In the example, we're using the first shard of a two shard operation.

results matching ""

    No results matching ""