Interfacecorev0.14.0
GateContextBase
The transport-agnostic gate context, the scalar identity of the acting user resolvable from any
transport's payload. Every field except core is nullable since an event or DM may carry no
guild or member. Each transport extends it with its own context. For example, the gateway adds the djs
user/guild/member objects and the live interaction or event payload.
interface GateContextBase extends DispatchOrigin, DispatchMemberValues// a gate reading only the base fields fits any handler on any transport
const NeedsGuild = defineGate('NeedsGuild', (ctx: GateContextBase) => {
if (!ctx.guildId) throw new NotInGuild();
});Inherited from:DispatchOrigin
readonly core: CoreBasereadonly dispatch: DispatchContextInherited from:DispatchOrigin
Inherited from:DispatchOrigin
readonly memberRoleIds: readonly string[]Inherited from:DispatchOrigin
Inherited from:DispatchOrigin