v5.0.0
$setTimeout
This function allows you to set a code to execute after given time. As extra, it won't stop if you reset the bot.
Raw usage: $setTimeout[duration;timeout data;timeout heartbeat (optional)]
Example:
1
//Setting a timeout that will send a message to your dms after given time.
2
bot.command({
3
name: "remindme",
4
code: `You will be reminded with $messageSlice[1] after $message[1].
5
$setTimeout[$message[1];
6
userID: $authorID
7
message: $messageSlice[1]]`
8
});
9
​
10
bot.timeoutCommand({
11
// channel: "ID", (This is optional)
12
code: `$sendDM[$timeoutData[userID];$timeoutData[message]]`
13
});
Copied!
These can go above 21 days
This function also comes with a sub function called: $timeoutData[property] the property value will depend on what you add inside the second field of $setTimeout.
Last modified 1mo ago
Copy link
Edit on GitHub