> ## Documentation Index
> Fetch the complete documentation index at: https://docs.razebot.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Command Aliases

> Create shortcuts to invoke other commands.

# Command Aliases

> Create shortcuts to invoke other commands.

## Overview

Command aliases allow you to create custom commands that run other commands. This can be useful for creating shorter or more memorable commands for your server. For example, you could create an alias that runs the `ban` command with a custom name like `deport`.

## Creating an alias

<CodeGroup>
  ```bash Syntax theme={null} theme={null}
  ;alias add (shortcut) (command)
  ```

  ```bash Example theme={null} theme={null}
  ;alias add deport ban
  ```
</CodeGroup>

### Predefined arguments

You can use predefined arguments in your aliases. If you want to pass what the user types into the alias, use `{0}` for the first argument, `{1}` for the second, and so on.

```bash theme={null} theme={null}
;ban @wanderer Harassing Members
// {0} would be @wanderer
// {1} would be Harassing Members
```

Below is an example of an alias that uses predefined arguments:

```bash theme={null} theme={null}
;alias add shh timeout {0} 10m
;shh @wanderer
```

This alias runs the `timeout` command where `{0}` is replaced by whoever you mention, and `10m` is fixed as the duration.

### Making a command to grant image permissions

If you want to create a command that grants a specific role to a user, you can use the following alias which invokes the `role` command with the predefined image role.

```bash theme={null} theme={null}
;alias add pic role {0} @image-role
;pic @wanderer
```

## Removing an alias

<CodeGroup>
  ```bash Syntax theme={null} theme={null}
  ;alias remove (shortcut)
  ```

  ```bash Example theme={null} theme={null}
  ;alias remove deport
  ```
</CodeGroup>

## Related commands

<Tabs>
  <Tab title="View an alias">
    See what command a shortcut invokes.

    ```bash theme={null} theme={null}
    ;alias view (shortcut)
    ```

    ```bash theme={null} theme={null}
    ;alias view deport
    ```
  </Tab>

  <Tab title="List all aliases">
    ```bash theme={null} theme={null}
    ;alias list
    ```
  </Tab>

  <Tab title="Reset">
    Remove all aliases in the server at once.

    ```bash theme={null} theme={null}
    ;alias reset
    ```
  </Tab>
</Tabs>
