# Managing commands

## Command Management

You can manage Wump's commands in various ways, some of them are:

1. Deleting a command's file
2. Disabling the command in it's extData
3. Editing the enabled commands inside of the configuration file

### Deleting a command's file

This is the simplest way to disable a command: by deleting it entirely.\
Although this is not recommended but it is an option, do as followed inside of the root directory:

{% code title="delete.sh" %}

```bash
#!/bin/bash

# Linux / Mac
rm -rf src/commands/Discord/<category>/<command>

# Windows
del ./src/commands/Discord/<category>/<command>
```

{% endcode %}

### Disabling the command

This is a much safer way than just straight up deleting the command: by editing a command's extData. The structure of a command's extData is like this:

{% code title="ping.js" %}

```javascript
cmd.extData = {
      path       : undefined,
      name       : 'ping',
      syntax     : 'ping',
      bearer     : 'wump',
      aliases    : [ 'pong' ],
      argument   : [],
      description: 'Lists latencies',

      hidden     : false,
      enabled    : true,
      cooldown   : 1000,
      category   : 'Utility',
      ownerOnly  : false,
      guildOnly  : false,
      permissions: [ 'embedLinks' ]
}
```

{% endcode %}

You can disable a command simply by changing `enabled` to `false`\
You can also hide a command but still make it usable by changing `hidden`to `true`\
Or you can make a command "op" only by setting `ownerOnly` to `true`

### Editing the configuration

The best way is by editing the `Discord.commands` array inside of your configuration file, the syntax is as followed:

{% code title="application.yml" %}

```yaml
...
Discord:
    ...
    commands:
        - * # Enables all commands
        - wump.* # Enables all commands with bearer "wump"
        - wump.utility.* # Enables all commands in category "utility" from bearer "wump"
        - wump.utility.ping # Only enables the "ping" command in category "utility" from bearer "wump"
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wessel.gitbook.io/yorushika/configuration/managing-commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
