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> abstract source
.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 this.setCooldown(...)
setCooldown(cooldown: number): this setCooldown(cooldown: number): this| Param | Type | Required |
|---|---|---|
| | Yes |
Returns:
this this.addPreconditions(...)
addPreconditions(...preconditions: RestOrArray<CommandPrecondition>): this addPreconditions(...preconditions: RestOrArray<CommandPrecondition>): this| Param | Type | Required |
|---|---|---|
| | No |
Returns:
this this.setPreconditions(...)
setPreconditions(...preconditions: RestOrArray<CommandPrecondition>): this setPreconditions(...preconditions: RestOrArray<CommandPrecondition>): this| Param | Type | Required |
|---|---|---|
| | No |
Returns:
this this.addPostconditions(...)
addPostconditions(...postconditions: RestOrArray<CommandPostcondition>): this addPostconditions(...postconditions: RestOrArray<CommandPostcondition>): this| Param | Type | Required |
|---|---|---|
| | No |
Returns:
this this.setPostconditions(...)
setPostconditions(...postconditions: RestOrArray<CommandPostcondition>): this setPostconditions(...postconditions: RestOrArray<CommandPostcondition>): this| Param | Type | Required |
|---|---|---|
| | No |
Returns:
this thisaddDisabledPreconditions(...preconditions: RestOrArray<CommandPrecondition.Resolvable|CommandPrecondition.Resolvable["id"]>): this addDisabledPreconditions(...preconditions: RestOrArray<CommandPrecondition.Resolvable|CommandPrecondition.Resolvable["id"]>): this| Param | Type | Required |
|---|---|---|
| | No |
Returns:
this thissetDisabledPreconditions(...preconditions: RestOrArray<CommandPrecondition.Resolvable|CommandPrecondition.Resolvable["id"]>): this setDisabledPreconditions(...preconditions: RestOrArray<CommandPrecondition.Resolvable|CommandPrecondition.Resolvable["id"]>): this| Param | Type | Required |
|---|---|---|
| | No |
Returns:
this thisaddDisabledPostconditions(...postconditions: RestOrArray<CommandPostcondition.Resolvable|CommandPostcondition.Resolvable["id"]>): this addDisabledPostconditions(...postconditions: RestOrArray<CommandPostcondition.Resolvable|CommandPostcondition.Resolvable["id"]>): this| Param | Type | Required |
|---|---|---|
| | No |
Returns:
this thissetDisabledPostconditions(...postconditions: RestOrArray<CommandPostcondition.Resolvable|CommandPostcondition.Resolvable["id"]>): this setDisabledPostconditions(...postconditions: RestOrArray<CommandPostcondition.Resolvable|CommandPostcondition.Resolvable["id"]>): this| Param | Type | Required |
|---|---|---|
| | No |
Returns:
this this.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>CommandPrecondition<any>[] CommandPrecondition<any>[]CommandPostcondition<any>[] CommandPostcondition<any>[]string[] string[]string[] string[]