$enabled

Allows you to enable/disable commands.

Usage

$enabled[enabled (yes/no);errorMessage]

Breakdown

  • enabled - 'yes' means the command is enabled, 'no' means it's disabled.
  • errorMessage - The message that is returned if the command is disabled.

Example

This section will explain how to disable/enable certain commands using server variables.

1: Create a variable named enabled and set the value to yes or no (whatever you want the default option to be. no - disabled, yes - enabled.)

example

2: Create a command for the enable command. Put this in the reply text/code section:

$setServerVar[enabled;yes]
I successfully enabled the __ command!
$onlyAdmin[❌ Only admins can enable commands!]

3: Create a command for the disable code. Put this in the reply text/code section:

$setServerVar[enabled;no]
I successfully disabled __ command!
$onlyAdmin[❌ Only admins can disable commands!]

4: In the command(s) you want the enable/disable to affect, put:

$enabled[$getServerVar[enabled];❌ This command is disabled!]

5: Now your bot has a system where servers can disable/enable command(s).

⚠️ In order to make this changeable for multiple commands, you'll need to do it multiple times (using different variable names). As this only affects the commands you put the "affect" code in.