Skip to main content
RequiresUserPermissions(…permissions): MethodDecorator
Defined in: packages/http-framework/src/lib/decorators/RequiresPermissions.ts:87 Decorator that only runs the decorated method when the invoking user has all of the given permissions in the channel the interaction was sent from.

Parameters

permissions

PermissionResolvable[] The permissions the invoking user must have.

Returns

MethodDecorator A method decorator.

Remarks

Interactions received outside of a guild carry no member permissions, so the check passes for them. Pair this decorator with RequiresGuildContext when the method must also be guild-only.

Example