EventGateContext
The event arm. It extends GuildPermissionsContext with the event payload and the djs objects derived from it. Names is the event(s) the gate supports, inferred from the ctx annotation, so a gate that reads one event's payload is rejected on a handler for a different event. The default supports every event.
interface EventGateContext<
Names extends ValidNonInteractionKeys = ValidNonInteractionKeys
> extends GuildPermissionsContextNames
The event name or names the gate reads, typing payload to that event's args tuple.
Names extends ValidNonInteractionKeys = ValidNonInteractionKeysappGuildPermissions
The bot's base permission set from the transport's cache. Null when the cached member is unavailable.
Inherited from:GuildPermissionsContext
appPermissions
The bot's permissions in the invoked channel, the wire app_permissions value. Null on gateway events.
Inherited from:GateContextBase
channelId
The channel id, or null when the source carries none.
Inherited from:GateContextBase
readonly core: Corereadonly eventName: NamesguildId
The guild id, or null outside a guild.
Inherited from:GateContextBase
readonly kind: 'event'readonly member: GuildMember | nullmemberGuildPermissions
The member's base permission set, roles only, matching djs GuildMember.permissions. Null when the member is unavailable.
Inherited from:GuildPermissionsContext
memberPermissions
The member's permission bits, or null outside a guild. On an interaction these are the channel-scoped permissions the payload contains, and on a gateway event they're the member's guild-level ones.
Inherited from:GateContextBase
memberRoleIds
The member's role ids without the everyone role, the shape a raw interaction payload contains. Empty outside a guild or when the source contains none.
readonly memberRoleIds: readonly string[]Inherited from:GateContextBase
readonly payload: ClientEvents[Names]routeId
The dispatched handler as kind:route (slash:daily, button:confirm), or null off a route (a plain event handler, or a gate run outside a handler). runHandlerGates sets it from the handler's metadata. Cooldown uses it so its window is stable across restarts and isolates.
Inherited from:GateContextBase
userId
The acting user's id, or null on an event that carries none.
Inherited from:GateContextBase