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 args
Array<Argument> The arguments for the await
check
CheckFunction The condition to be met for the await to trigger
timeout
Number How long until the await expires
oneTime
Boolean Whether a non-triggering message cancels the await
refreshOnUse
Boolean Whether the timeout for the await refreshes after a use
onCancelFunction
CancelFunction A function to run once the await expires or is cancelled
user
String The ID of the user to await the message from (By default, it's the user who triggered the command)
channel
String The channel to await the message (By default, it's the channel the command was called in)
shouldShift
Boolean Whether the command handler should shift out the first space-separated keyword for argument parsing or not
requirePrefix
Boolean 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 data
Object Further await data
Properties:
Name Type Description data.id
String The ID of the await in its parent map
data.awaitMap
Map<String, Await> The map that the await is stored in
data.triggerResponse
Eris.Message The response to the command that initiated the await