new Await(data)
Create an Await
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | The await data |
Properties:
| Name | Type | Attributes | Default | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data.options |
Object |
<optional> |
{} | The options for the await Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
data.action |
AwaitAction | The await action |
Members
-
private _awaitMap : Map<String, Await>
-
The map that the await is stored in
-
private _id : String
-
The ID of the await.
-
private _timer : Timeout
-
The delete timer for the await
-
private _timer : Timeout
-
The delete timer for the await
-
action : AwaitAction
-
The await action
-
options : Object
-
The options for the await
Properties:
Name Type Description argsArray<Argument> The arguments for the await
checkCheckFunction The condition to be met for the await to trigger
timeoutNumber How long until the await expires
oneTimeBoolean Whether a non-triggering message cancels the await
refreshOnUseBoolean Whether the timeout for the await refreshes after a use
onCancelFunctionCancelFunction A function to run once the await expires or is cancelled
userString The ID of the user to await the message from (By default, it's the user who triggered the command)
channelString The channel to await the message (By default, it's the channel the command was called in)
shouldShiftBoolean Whether the command handler should shift out the first space-separated keyword for argument parsing or not
requirePrefixBoolean Whether the await requires the bot prefix to be triggered
-
triggerResponse : Eris.Message
-
The response to the command that initiated the await
Methods
-
clear() → {Await}
-
Clear the await from its storage
-
refresh() → {Await}
-
Refresh the delete timer for the await
-
startTimer(data) → {Await}
-
Start the delete timer for the await
Parameters:
Name Type Description dataObject Further await data
Properties:
Name Type Description data.idString The ID of the await in its parent map
data.awaitMapMap<String, Await> The map that the await is stored in
data.triggerResponseEris.Message The response to the command that initiated the await