Skip to main content

Module: decorators/src

Enumerations

Interfaces

Functions

ApplyOptions

ApplyOptions<T>(optionsOrFn): ClassDecorator

Type parameters

NameType
Textends PieceOptions

Parameters

NameType
optionsOrFnT | (parameters: ApplyOptionsCallbackParameters) => T

Returns

ClassDecorator

Defined in

projects/utilities/packages/decorators/src/piece-decorators.ts:52


Enumerable

Enumerable(value): (target: unknown, key: string) => void

Parameters

NameTypeDescription
valueboolean

Returns

fn

▸ (target, key): void

Parameters
NameType
targetunknown
keystring
Returns

void

Defined in

projects/utilities/packages/decorators/src/base-decorators.ts:8


EnumerableMethod

EnumerableMethod(value): MethodDecorator

Parameters

NameTypeDescription
valueboolean

Returns

MethodDecorator

Defined in

projects/utilities/packages/decorators/src/base-decorators.ts:28


RequiresClientPermissions

RequiresClientPermissions(...permissionsResolvable): MethodDecorator

Parameters

NameTypeDescription
...permissionsResolvablePermissionResolvable[]

Returns

MethodDecorator

Defined in

projects/utilities/packages/decorators/src/djs-decorators.ts:79


RequiresDMContext

RequiresDMContext(fallback?): MethodDecorator

Parameters

NameTypeDescription
fallbackFunctionFallback

Returns

MethodDecorator

Defined in

projects/utilities/packages/decorators/src/djs-decorators.ts:192


RequiresGuildContext

RequiresGuildContext(fallback?): MethodDecorator

Parameters

NameTypeDescription
fallbackFunctionFallback

Returns

MethodDecorator

Defined in

projects/utilities/packages/decorators/src/djs-decorators.ts:183


RequiresUserPermissions

RequiresUserPermissions(...permissionsResolvable): MethodDecorator

Parameters

NameTypeDescription
...permissionsResolvablePermissionResolvable[]

Returns

MethodDecorator

Defined in

projects/utilities/packages/decorators/src/djs-decorators.ts:148


createClassDecorator

createClassDecorator<TFunction>(fn): ClassDecorator

Type parameters

NameType
TFunctionextends (...args: any[]) => void

Parameters

NameTypeDescription
fnTFunction

Returns

ClassDecorator

Defined in

projects/utilities/packages/decorators/src/utils.ts:43


createFunctionPrecondition

createFunctionPrecondition(precondition, fallback?): MethodDecorator

Parameters

NameTypeDescription
preconditionFunctionPrecondition
fallbackFunctionFallback

Returns

MethodDecorator

Defined in

projects/utilities/packages/decorators/src/utils.ts:73


createMethodDecorator

createMethodDecorator(fn): MethodDecorator

Parameters

NameTypeDescription
fnMethodDecorator

Returns

MethodDecorator

Defined in

projects/utilities/packages/decorators/src/utils.ts:34