$setTimeout
$setTimeout
will set a timeout for a given action (which will even continue to run after bot restart).
Usage
Parameters
Field | Type | Description | Required |
---|---|---|---|
awaitedCmd | string | Awaited command to execute after duration ends. | true |
duration | string, number | After how much time it will execute / this cannot go over 21 days. | true |
timeoutData | object | Timeout data. | true |
returnId? | boolean | Return timeout ID. | false |
- You can retrieve timeout data using
$timeoutData[name]
.
Example(s)
This will send “Hello!” after 10 seconds in the command execution channel: