Command Status and Error
When `status` is set to `enabled`, the command will be executed as normal. When set to `disabled`, the command will be disabled and the error will be returned if one is set.
Is in BETA and some attributes of intended purpose are not finished yet. 1. Cannot use variables to manipulate the status or error command properties yet.

The command Status:

status: "enabled",

-- or --

status: "disabled",

1. The command will execute as intended.

1
bot.Command({
2
name: "ping",
3
status: "enabled",
4
code: `
5
$ping ms
6
`
7
})
Copied!

2. The command will not execute at all.

1
bot.Command({
2
name: "ping",
3
status: "disabled",
4
code: `
5
$ping ms
6
`
7
})
Copied!

3. Checks a command to see whether it is disabled or not.

1
bot.Command({
2
name: "ping",
3
status: "enabled",
4
code: `
5
$ping ms
6
`
7
})
Copied!

The command Error: error: "Command is disabled",

Returns: Command is disabled! When the status is set to disabled

1
bot.Command({
2
name: "ping",
3
status: "disabled",
4
error: "Command is disabled!",
5
code: `
6
$ping ms
7
`
8
})
Copied!
Last modified 8mo ago