interface CreateWebSocketManagerOptions extends Partial<OptionalWebSocketManagerOptions>, RequiredWebSocketManagerOptions
externalGatewayIntentBits | 0 intents :
The intents to request
Inherited from: RequiredWebSocketManagerOptions
external fetchGatewayInformationAwaitable<RESTGetAPIGatewayBotResult> () :
Function for retrieving the information returned by the /gateway/bot
endpoint. We recommend using a REST client that respects Discord's rate limits, such as @discordjs/rest
.
Examples:
const rest = new REST().setToken(process.env.DISCORD_TOKEN);
const manager = new WebSocketManager({
token: process.env.DISCORD_TOKEN,
fetchGatewayInformation() {
return rest.get(Routes.gatewayBot()) as Promise<RESTGetAPIGatewayBotResult>;
},
});
Inherited from: RequiredWebSocketManagerOptions