This repository has been archived by the owner on Jan 28, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
How to slash command
Elias Schaut edited this page Jan 15, 2022
·
8 revisions
- Add the
enable_slash: true
modificator to the command - If the command needs arguments there are two ways to integrate that into slash_commands.
- Create an option model or,
- Autcreate options with the command-modifications
min/max-args-needed
, ifauto_slash_options
in config file is true.
- Restart/Start Programm
- Create a new JS file in
option_models
folder called<name-of-command>.js
- Copy the option model sceleton and past it into that file
- Fill in the gaps
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 |