InteractionGateContext
The context a gate gets on an interaction. It extends GuildPermissionsContext with the live interaction and
the djs objects resolved from the gateway cache. Repliable is the interaction type the gate
supports, inferred from the ctx annotation, so a gate reading button-specific fields is rejected
on a slash handler. interaction is the reply target, so user is always present. Use
NonModalInteraction to exclude ModalSubmit when the gate needs a reliable caller member or
channel.
interface InteractionGateContext<
Repliable extends Repliables = Repliables
>
extends GuildPermissionsContext, AppPermissionsContextRepliable
The interaction type the gate reads, narrowing which handlers accept it.
Repliable extends Repliables = RepliablesappGuildPermissions
The bot's base permission set from the transport's cache. It's 0n in a guild the bot isn't in. It's null
when the guild is cached but the bot's member isn't.
Inherited from:GuildPermissionsContext
appPermissions
The bot's permissions in the invoked channel, the wire app_permissions value.
readonly appPermissions: bigintInherited from:AppPermissionsContext
channelId
The channel id, or null when the source carries none.
Inherited from:GateContextBase
readonly core: Coredispatch
The bag for this dispatch, the same instance the handler and its middleware hold. Every middleware runs before the first gate. A gate can therefore read what a middleware wrote.
readonly dispatch: DispatchContextInherited from:GateContextBase
guildId
The guild id, or null outside a guild.
Inherited from:GateContextBase
readonly interaction: Repliablereadonly kind: 'interaction'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 user: UseruserId
The acting user's id, or null on an event that carries none.
Inherited from:GateContextBase