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#usefor assigning middleware functions to commands
Properties
.guildOnly: ClassDecorator
.hidden: ClassDecorator
.localizable: MethodDecorator
Creates a ResourceProxy object 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().
- Deprecated:
- in favor of
localize. Will be removed in a future release
- in favor of
- Source:
.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) .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 |