Grouping of static decorator methods for the Command
class and Command#action
method
Note: This is a TypeScript feature. JavaScript users are limited to using CommandInfo to define their commands and
Command#use
for assigning middleware functions to commands
Properties
.guildOnly: ClassDecorator
.hidden: ClassDecorator
.localizable: MethodDecorator
Creates a ResourceLoader
function using the localization
language for the command call and passes it as the first argument
for that command call.
Identical to localize
but used
as a Command action method decorator.
Like the localize
middleware, you will want to use this after
any other usages of middleware via @using()
.
Middleware added via Command#use
is evaluated before
middleware added via @using()
.
.ownerOnly: ClassDecorator
Methods
(static) .aliases(values: string) → ClassDecorator
Set aliases
metadata
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
values |
|
<repeatable> |
Values to set |
(static) .argOpts(value: ArgOpts) → ClassDecorator
Set argOpts
metadata
Parameters:
Name | Type | Description |
---|---|---|
value |
|
Value to set |
(static) .callerPermissions(values: PermissionResolvable) → ClassDecorator
Set callerPermissions
metadata
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
values |
|
<repeatable> |
Values to set |
(static) .clientPermissions(values: PermissionResolvable) → ClassDecorator
Set clientPermissions
metadata
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
values |
|
<repeatable> |
Values to set |
(static) .desc(value: string) → ClassDecorator
Set desc
metadata
Parameters:
Name | Type | Description |
---|---|---|
value |
|
Value to set |
(static) .group(value: string) → ClassDecorator
Set group
metadata
Parameters:
Name | Type | Description |
---|---|---|
value |
|
Value to set |
(static) .info(value: string) → ClassDecorator
Set info
metadata
Parameters:
Name | Type | Description |
---|---|---|
value |
|
Value to set |
(static) .name(value: string) → ClassDecorator
Set name
metadata
Parameters:
Name | Type | Description |
---|---|---|
value |
|
Value to set |
(static) .overloads(value: string) → ClassDecorator
Set overloads
metadata
Parameters:
Name | Type | Description |
---|---|---|
value |
|
Value to set |
(static) .ratelimit(value: string) → ClassDecorator
Set ratelimit
metadata
Parameters:
Name | Type | Description |
---|---|---|
value |
|
Value to set |
(static) .roles(values: string) → ClassDecorator
Set roles
metadata
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
values |
|
<repeatable> |
Values to set |
(static) .usage(value: string) → ClassDecorator
Set usage
metadata
Parameters:
Name | Type | Description |
---|---|---|
value |
|
Value to set |
(static) .using(func: MiddlewareFunction) → MethodDecorator
Apply a middleware function to the action method of a Command.
Identical to Command#use
but used as a Command action
method decorator
Parameters:
Name | Type | Description |
---|---|---|
func |
|
Middleware function to use for the decorated Command action |