bot.ExecutableCommand
This allow you to execute a command only from an $onlyIf
{execute:command} can only be used inside the error message of an $onlyIf and nothing else
The command: Usage: ?number 5
1
bot.Command({
2
name: "number",
3
code: `
4
Yea that's a number!
5
$onlyIf[$isNumber[$message[1]]==true;{execute:notanumber}]
6
`
7
})
Copied!
The executable/response if message is not a number:
1
bot.ExecutableCommand({
2
name: "notanumber",
3
code: `
4
That's not a number so you lost 50 points
5
$setUserVar[points;$sub[$getUserVar[points];50]]
6
`
7
})
Copied!
Don't forget to join our discord server!
Last modified 1yr ago
Copy link