$If
If conditions meet in the 1st field, the code or message in the 2nd field will be executed.

FUNCTION USAGE

  • $If[condition;execute]

Properties:

condition - The condition for the code to be executed. This field kind of acts like $onlyIf. execute - If condition meets, this field will execute code or a message.

Example: Throwing 3 commands into 1 command using $If.

bot.Command({
name: "test",
code: `
$If[$message[]==yes;no]
$If[$message[]==icon;$guildIcon]
$If[$message[]==reboot;$reboot[$client[mention] is rebooting...]]
`
})
Copy link