Executables
Executables allow your bot to execute a command from any function in the custom error field as well as some other functions like `$channelSendMessage`.

Don't let it end there! When your bot encounters an error, keep the flow of things going with executable commands which will execute when your bot runs into an error!

The command when no error occurs. if an error occurs, it will run the executable code block instead:

1
bot.Command({
2
name: "test",
3
code:`
4
Command author is the guild owner!
5
$setNickname[$authorID;IS THE OWNER]
6
$onlyIf[$authorID==$ownerID;{execute:F}]
7
`})
Copied!

The command when encountered an error:

1
bot.ExecutableCommand({
2
name: "F",
3
code: `
4
$setNickname[$authorID;NOT THE OWNER]
5
$title[Executable command success]
6
$color[00FF00]
7
$description[Command author is NOT the guild owner!]
8
$footer[From: $tag]
9
`
10
})
Copied!
Last modified 6mo ago
Copy link