Optional
autotrue
Optional
compressIf packets to and from Discord should be compressed.
false
Optional
concurrencyThe concurrency for shard connections. If you don't know what this is, don't mess with it. Only bots in >150,000 servers can use any non-default value.
1
Optional
connectionThe properties
used when identifying.
Optional
browser?: stringThe browser of the client. For example, "Discord Android" or "Discord iOS" to show as mobile.
Oceanic
Optional
device?: stringThe device of the client.
Oceanic
Optional
os?: stringThe operating system of the client.
process.platform()
Optional
connectionThe maximum amount of time in milliseconds to wait for a connection to be established.
30000
Optional
dispatcherThe options for the dispatcher, which handles events.
Optional
firstThe ID of the first shard to run for this client. Mutually exclusive with shardIDs
.
0
Optional
getIf the members of all guilds should be requested. Requires the GUILD_MEMBERS
intent.
false
Optional
guildThe time in milliseconds after which the client will consider all guilds to have been received.
2000
Optional
intentsThe intents to use. Either a number, array of intent names, array of numbers, or "ALL"/"ALL_NON_PRIVILEGED". All non privileged intents are used by default.
{@link Constants~AllNonPrivilegedIntents | All Non Privileged Intents}
Optional
largeThe threshold at which guilds are considered "large" (after which offline members will not be loaded).
250
Optional
lastThe ID of the last shard to run for this client. Mutually exclusive with shardIDs
.
maxShards - 1
Optional
lookupIf upon recieving a disconnect for disallowed intents, we should request the application's flags and list the privileged intents that are missing in the error. This requires making a request to /applications/@me
.
false
Optional
maxThe maximum number of attempts to reconnect.
Infinity
Optional
maxThe maximum number of attempts to resume a lost connection.
10
Optional
maxThe total number of shards across all running clients. Limit the number of shards per client via firstShardID
& lastShardID
.
1
Optional
overrideOptions for overriding default gateway behavior.
Optional
presenceThe initial presence to use when connecting.
Optional
reconnectA function to calculate the delay between reconnect attempts.
(lastDelay, attempts) => Math.pow(attempts + 1, 0.7) * 20000
Optional
removeIf a check should be made before connecting, which will remove any disallowed intents. This requires making a request to /applications/@me
. Any removed intents will be emitted via the warn
event.
false
Optional
seedIf existing voice connections should be populated. This will disconnect connections from other sessions.
false
Optional
shardIDsAn array of shard IDs to run for this client. Mutually exclusive with firstShardID
& lastShardID
.
based on firstShardID
& lastShardID
Optional
wsThe options to pass to constructed websockets.
If dropped connections should be automatically reconnected.