Skip to content

GatewayConfig

GatewayConfig = object

Defined in: gateway.ts:20

optional bot?: Pick<Bot, "answer">

Defined in: gateway.ts:32

The bot from bot(). Its handlers answer the commands, buttons and modals that arrive over the gateway, so the application needs no Interactions Endpoint URL.


events: { [P in GatewayDispatchPayload as P["t"]]?: (data: P["d"], c: { send: Send }) => unknown }

Defined in: gateway.ts:39

A handler per dispatch event name, such as MESSAGE_CREATE. c.send posts a message to a channel, with optional buttons and embeds.


intents: Intent[]

Defined in: gateway.ts:25

The names of the gateway intents the bot needs, such as 'GuildMessages'. Turn on privileged ones, such as 'MessageContent', in the Developer Portal first.


optional onError?: ErrorHandler

Defined in: gateway.ts:34

Gets errors from event handlers and from answering interactions.


optional presence?: GatewayPresenceUpdateData

Defined in: gateway.ts:27

The status the bot shows while it is connected.