Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

How to slash command

Elias Schaut edited this page Jan 15, 2022 · 8 revisions

How to make a command addressable via slash commands

  1. Add the enable_slash: true modificator to the command
  2. If the command needs arguments there are two ways to integrate that into slash_commands.
  3. Restart/Start Programm

How to add an option model

Option Model Sceleton

module.exports = [
    {
        "name": "<option1>",
        "description": "<description1>",
        "required": false,
        "choices": [
            { "name": "<choice1>", "value": "<choice1>" },
            { "name": "<choice2>", "value": "<choice2>" }
        ]
    },
    {
        "name": "<option2>",
        "description": "<description2>",
        "required": false,
        "choices": []
    }
]
Key Description Value-Type
name Displayed name of the option String
description Displayed description the option String
required The option must be set or is optional Boolean
choices A list of choices for this option. If it's not empty, the user must use one of the given choices instead of something else List
choices.name Displayed name of the choice String
choices.value Value of the choice used in code later String
Clone this wiki locally