Functioncorev0.1.0-next.5
RequirePermissions
Requires the caller to hold every permission in scopescope. Refuses outside a guild first, then when a permission is missing. The Administrator bit passes any scope.
The default 'channel''channel' scope reads the effective channel set the payload carries, what Discord enforces in the invoked channel. The 'guild''guild' scope reads the base set from roles and requires a GuildPermissionsContextGuildPermissionsContext, so it fits a gateway handler only.
See also:the @Gated decorator from seedcord
RequirePermissions(
scope: PermissionScope,
options: RequirePermissionsOptions & { in: "guild" }
): Gate<GuildPermissionsContext, "RequirePermissions">RequirePermissions(
scope: PermissionScope,
options: RequirePermissionsOptions & { in: "guild" }
): Gate<GuildPermissionsContext, "RequirePermissions">scope
scope: PermissionScopescope: PermissionScopeThe permission flag bits the caller must all hold.
options
options: RequirePermissionsOptions & { in: 'guild'; }options: RequirePermissionsOptions & { in: 'guild'; }Pick the scope with inin, and override each refusal with notInGuildnotInGuild or missingmissing.