Skip to main content

@sapphire/decorators

Enumerations

EnumerationDescription
DecoratorIdentifiers-

Interfaces

InterfaceDescription
ApplyOptionsCallbackParameters-
FunctionFallbackThe arguments passed to the function or class' method.
FunctionPreconditionThe arguments passed to the function or class' method.

Functions

FunctionDescription
ApplyOptionsDecorator function that applies given options to any Sapphire piece
EnumerableDecorator that sets the enumerable property of a class field to the desired value.
EnumerableMethodDecorator that sets the enumerable property of a class method to the desired value.
RequiresClientPermissions-
RequiresDMContextRequires the message to be run in a dm context, this decorator requires the first argument to be a Message or BaseInteraction instance which includes all interaction types
RequiresGuildContextRequires the message to be run in a guild context, this decorator requires the first argument to be a Message or BaseInteraction instance which includes all interaction types
RequiresUserPermissions-
createClassDecoratorUtility to make a class decorator with lighter syntax and inferred types.
createFunctionPreconditionUtility to make function preconditions.
createMethodDecoratorUtility to make a method decorator with lighter syntax and inferred types.