Create one or more connections (depending on the selected amount of shards) to the Discord gateway.
This function returns a promise which is solely used for awaiting the getGateway() method's return value.
Disconnect the bot gracefully, you will receive a 'disconnected' event once the ShardManager successfully closes all shard websocket connections.
Method to grab initial connection info from Discord. Should only be called automatically by the lib unless you are a large bot with a max_concurrency not equal to 1. If you are a large bot, you should call this method at a rate of your own discretion to update your max_concurrency cached value to have up to date bucket info.
The amount of shards the bot should spawn if set to auto.
Get the gateway endpoint to connect to.
String url with the Gateway Endpoint to connect to.
Get the GatewayData including recommended amount of shards and other helpful info.
Object with url and shards to use to connect to discord.
Send an OP 3 PRESENCE_UPDATE to Discord, which updates the status of all shards facilitated by this client's ShardManager.
Promise that's resolved once all shards have sent the websocket payload.
Send an OP 8 REQUEST_GUILD_MEMBERS to Discord.
id of the shard that should send the payload.
Request guild members data to send.
Promise that's resolved once the payload was send to Discord.
Send an OP 3 PRESENCE_UPDATE to Discord, which updates the status of a single shard facilitated by this client's ShardManager.
id of the shard that should update it's status.
Presence data to send.
Promise that's resolved once the shard has sent the websocket payload.
Send an OP 4 VOICE_STATE_UPDATE to Discord. this does not allow you to send audio with CloudStorm itself, it just provides the necessary data for another application to send audio data to Discord.
id of the shard that should send the payload.
Voice state update data to send.
Promise that's resolved once the payload was sent to Discord.
Generated using TypeDoc
Create a new Client to connect to the Discord gateway.