Skip to content

$awaitMessages

$awaitMessages will reply once a given message has been sent by the given user.

Usage

$awaitMessages[channelID;userFilter;time;replies;cmds;errorMessage?;awaitData?;dm?]

Parameters

FieldTypeDescriptionRequired
channelIDnumberChannel ID.true
userFilternumberUser filter
1. everyone
2. specific user - any user ID
true
timestringHow long the command lasts / when it expires.true
repliesstringTo what the bot will be responding to, multiple words can be separated with a comma (or use “everything” to respond to everything)true
cmdsstringCommands that will be executed, multiple commands can be separated with a comma.true
errorMessage?stringError message when the command expires.false
awaitData?stringAwaited Data.false
dm?numberUser ID of where the command may be executed.false

Example(s)

This will reply to any message you send after executing the command:

1
client.command({
2
name: "awaitMessages",
3
code: `
4
$awaitMessages[$channelID;$authorID;15s;everything;awaitedcommandexample;Oh? You don't want to talk to me..?]
5
What's your name?
6
`
7
// Please make sure that the awaitedCommand name is ALL lowercase or else it won't work.
8
});
9
10
client.awaitedCommand({
11
name: "awaitedcommandexample",
12
code: `
13
Nice to meet you, $message!
14
`
15
});