Command Aliases
CollectionSourceDiscord
  • Getting Command Aliases
  • Quick Start Guide
  • Configuration
  • Command Modes
    • Redirect
    • Redirect without arguments
    • Reassign
    • Custom
      • Functions
      • Base Component
      • Child Component
      • Action Component
      • Suggestion Provider Component
  • Commands
Powered by GitBook
On this page
  • Create a command alias using COMMAND_REASSIGN
  • Examples

Was this helpful?

Edit on GitHub
  1. Command Modes

Reassign

When using the COMMAND_REASSIGN command mode, it will reassign the existing command to a new command name.

Create a command alias using COMMAND_REASSIGN

First, we need to set our command mode to COMMAND_REASSIGN.

  • JSON or JSON5

{
    "schemaVersion": 1,
    "commandMode": "COMMAND_REASSIGN"
}
  • TOML

schemaVersion = 1
commandMode = "COMMAND_REASSIGN"
  • YAML

schemaVersion: 1
commandMode: COMMAND_REASSIGN

Now that we have set our command mode, we can define our new command.

  • JSON or JSON5

{
    "schemaVersion": 1,
    "commandMode": "COMMAND_REASSIGN",
    "command": "help"
}
  • TOML

schemaVersion = 1
commandMode = "COMMAND_REASSIGN"
command = "help"
  • YAML

schemaVersion: 1
commandMode: COMMAND_REASSIGN
command: help

Finally, we chose what existing command our new command will reassign to. In this case, I chose the /help command.

  • JSON or JSON5

{
    "schemaVersion": 1,
    "commandMode": "COMMAND_REASSIGN",
    "command": "help",
    "reassignTo": "minecraft:help"
}
  • TOML

schemaVersion = 1
commandMode = "COMMAND_REASSIGN"
command = "help"
reassignTo = "minecraft:help"
  • YAML

schemaVersion: 1
commandMode: COMMAND_REASSIGN
command: help
reassignTo: 'minecraft:help'

Congratulations, you have now reassigned the command /help to /minecraft:help.

Note: The reassignTo field must not contain any spaces.

Examples

Game Mode Command

  • JSON or JSON5

{
    "schemaVersion": 1,
    "commandMode": "COMMAND_REASSIGN",
    "command": "gamemode",
    "reassignTo": "gm"
}
  • TOML

schemaVersion = 1
commandMode = "COMMAND_REASSIGN"
command = "gamemode"
reassignTo = "gm"
  • YAML

schemaVersion: 1
commandMode: COMMAND_REASSIGN
command: gamemode
reassignTo: gm
PreviousRedirect without argumentsNextCustom

Last updated 2 years ago

Was this helpful?