Functionalities
Other
$commandStatus
Returns `enabled` if the current or given command is enabled. Returns `disabled` if the given command is disabled. Returns `undefined` if the given command does not exist.

FUNCTION USAGE

  • $commandStatus
  • $commandStatus[]
  • $commandStatus[commandName]

Properties:

[] - Returns the status of the current command. Same as no brackets. commandName - Define a command name to return the command's status.

Input/Output:

  • enabled
  • disabled

Example 1: Function will return "enabled" since status is set to "enabled".

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

Example 2: Function will return "enabled" since the command's status is set to "enabled".

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

Example 3: Function will return "disabled" since the command's status is set to disabled.

1
bot.Command({
2
name: "test2",
3
status: enabled,
4
code: `
5
$commandStatus[test1]
6
`
7
})
Copied!
Last modified 8mo ago
Copy link