BaseCommand
class
BaseCommand
sourceexport abstract class BaseCommand<T extends CommandType> implements BaseCommand.Data<T> export abstract class BaseCommand<T extends CommandType> implements BaseCommand.Data<T>constructor(data?: Partial<BaseCommand.Data<T>>) constructor(data?: Partial<BaseCommand.Data<T>>)| Param | Type | Required |
|---|---|---|
| | No |
execute(data: AnyCommandExecuteData<T>): Promise<void> execute(data: AnyCommandExecuteData<T>): Promise<void>| Param | Type | Required |
|---|---|---|
| | Yes |
Returns:
Promise<void> Promise<void>.setCommand(...)
setCommand(data: AnyCommandBuilderData<T>|JSONEncodable<AnyCommandBuilderData<T>>|(((builder: AnyCommandBuilder<T>)) => AnyCommandBuilderData<T>|JSONEncodable<AnyCommandBuilderData<T>>)): this setCommand(data: AnyCommandBuilderData<T>|JSONEncodable<AnyCommandBuilderData<T>>|(((builder: AnyCommandBuilder<T>)) => AnyCommandBuilderData<T>|JSONEncodable<AnyCommandBuilderData<T>>)): this| Param | Type | Required |
|---|---|---|
| | Yes |
Returns:
this thispublic source
.setCooldown(...)
setCooldown(cooldown: number): this setCooldown(cooldown: number): this| Param | Type | Required |
|---|---|---|
| | Yes |
Returns:
this thispublic source
.addPreconditions(...)
addPreconditions(...preconditions: RestOrArray<CommandPrecondition>): this addPreconditions(...preconditions: RestOrArray<CommandPrecondition>): this| Param | Type | Required |
|---|---|---|
| | No |
Returns:
this thispublic source
.setPreconditions(...)
setPreconditions(...preconditions: RestOrArray<CommandPrecondition>): this setPreconditions(...preconditions: RestOrArray<CommandPrecondition>): this| Param | Type | Required |
|---|---|---|
| | No |
Returns:
this thispublic source
.addPostconditions(...)
addPostconditions(...postconditions: RestOrArray<CommandPostcondition>): this addPostconditions(...postconditions: RestOrArray<CommandPostcondition>): this| Param | Type | Required |
|---|---|---|
| | No |
Returns:
this thispublic source
.setPostconditions(...)
setPostconditions(...postconditions: RestOrArray<CommandPostcondition>): this setPostconditions(...postconditions: RestOrArray<CommandPostcondition>): this| Param | Type | Required |
|---|---|---|
| | No |
Returns:
this thispublic source
.addDisabledPreconditions(...)
addDisabledPreconditions(...preconditions: RestOrArray<CommandPrecondition.Resolvable|CommandPrecondition.Resolvable["id"]>): this addDisabledPreconditions(...preconditions: RestOrArray<CommandPrecondition.Resolvable|CommandPrecondition.Resolvable["id"]>): this| Param | Type | Required |
|---|---|---|
| | No |
Returns:
this thispublic source
.setDisabledPreconditions(...)
setDisabledPreconditions(...preconditions: RestOrArray<CommandPrecondition.Resolvable|CommandPrecondition.Resolvable["id"]>): this setDisabledPreconditions(...preconditions: RestOrArray<CommandPrecondition.Resolvable|CommandPrecondition.Resolvable["id"]>): this| Param | Type | Required |
|---|---|---|
| | No |
Returns:
this thispublic source
.addDisabledPostconditions(...)
addDisabledPostconditions(...postconditions: RestOrArray<CommandPostcondition.Resolvable|CommandPostcondition.Resolvable["id"]>): this addDisabledPostconditions(...postconditions: RestOrArray<CommandPostcondition.Resolvable|CommandPostcondition.Resolvable["id"]>): this| Param | Type | Required |
|---|---|---|
| | No |
Returns:
this thispublic source
.setDisabledPostconditions(...)
setDisabledPostconditions(...postconditions: RestOrArray<CommandPostcondition.Resolvable|CommandPostcondition.Resolvable["id"]>): this setDisabledPostconditions(...postconditions: RestOrArray<CommandPostcondition.Resolvable|CommandPostcondition.Resolvable["id"]>): this| Param | Type | Required |
|---|---|---|
| | No |
Returns:
this thispublic source
.setExecute(...)
setExecute(execute: ((data: AnyCommandExecuteData<T>)) => Promise<void>): this setExecute(execute: ((data: AnyCommandExecuteData<T>)) => Promise<void>): this| Param | Type | Required |
|---|---|---|
| | Yes |
Returns:
this thistoJSON(): BaseCommand.Data<T> toJSON(): BaseCommand.Data<T>Returns:
BaseCommand.Data<T> BaseCommand.Data<T>AnyCommandBuilderData<T> AnyCommandBuilderData<T>public source
.preconditions
CommandPrecondition<any>[] CommandPrecondition<any>[]public source
.postconditions
CommandPostcondition<any>[] CommandPostcondition<any>[]public source
.disabledPreconditions
string[] string[]public source
.disabledPostconditions
string[] string[]