Constructor
new CommandLock(siblings: string)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
siblings |
|
<repeatable> |
Associated commands to lock |
- Source:
Methods
.free(message: Message, args: any[]) → void
Frees this lock. Called automatically when the command finishes, or when the lockTimeout fires
Parameters:
| Name | Type | Description |
|---|---|---|
message |
|
Message that triggered the command |
args |
|
Arguments passed to the command |
- Source:
.getError(lang: string, message: Message, args: any[]) → string
Get an error string describing the effects of this lock. Defaults
to 'This command is currently in use. for en_us.
When defining your own lock behavior, consider using details related to the conditions under which your commands are locked.
Parameters:
| Name | Type | Description |
|---|---|---|
lang |
|
The language to use for the error string |
message |
|
Message that triggered the command |
args |
|
Arguments passed to the command |
- Source:
.isLocked(message: Message, args: any[]) → boolean
Returns whether or not this lock is active
Parameters:
| Name | Type | Description |
|---|---|---|
message |
|
Message that triggered the command |
args |
|
Arguments passed to the command |
- Source:
.lock(message: Message, args: any[]) → void
Sets the lock
Parameters:
| Name | Type | Description |
|---|---|---|
message |
|
Message that triggered the command |
args |
|
Arguments passed to the command |
- Source: