Skip to main content
RequiresClientPermissions(…permissions): MethodDecorator
Defined in: packages/http-framework/src/lib/decorators/RequiresPermissions.ts:41 Decorator that only runs the decorated method when the application has all of the given permissions in the channel the interaction was sent from, as reported by the interaction’s app_permissions field.

Parameters

permissions

PermissionResolvable[] The permissions the application must have.

Returns

MethodDecorator A method decorator.

Remarks

When the fallback is omitted, a PreconditionError identified by Identifiers.PreconditionClientPermissions is thrown, which the client emits as commandError (or interactionHandlerError) for a Listener to turn into a user-facing reply.

Example