> For the complete documentation index, see [llms.txt](https://infinitybot.gitbook.io/infinitybot-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infinitybot.gitbook.io/infinitybot-docs/moderation/basic-moderation-tools.md).

# Basic Moderation Tools

InfinityBot has a set of moderation commands for your server to moderate your members, roles, channels and more!

{% hint style="info" %}
Are you having issues with a moderation command? Please check out the [common issues](/infinitybot-docs/guides/infinitybot-guides/common-issues.md) page too.&#x20;
{% endhint %}

## Ban Commands

### Ban a User

You can ban a user with the `/ban add` command. After you used the command, you will get a form to fill out the reason of the ban.&#x20;

| Command Option Name | Function                                                          |
| ------------------- | ----------------------------------------------------------------- |
| user                | In this option you can select the user that you would like to ban |

#### Prefix Ban Command

You can also use the `!ban` [prefix command](/infinitybot-docs/guides/infinitybot-guides/command-guides/how-prefix-commands-work.md) to ban a user.

The template for this command is: `!ban @user reason`

| Command Option Name | Function                                                             |
| ------------------- | -------------------------------------------------------------------- |
| @user               | For this option you can @mention the user that you would like to ban |
| Reason              | For this option you can enter the reason of the ban                  |

### Unban a User

You can remove a ban from a user with the `/ban remove` command. After you used the command, you will get a form to fill out the reason of the unban.

| Command Option Name | Function                                                                                                                                                    |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| user-id             | In this option you can enter the [user ID](/infinitybot-docs/guides/discord-guides/how-to-get-an-id-on-discord.md) of the user that you would like to unban |

### Temporarily Ban a User

You can temporarily ban a user with the `/ban temp` command. After you used the command, you will get a form to fill out the reason of the ban.&#x20;

| Command Option Name | Function                                                                                               |
| ------------------- | ------------------------------------------------------------------------------------------------------ |
| user                | In this option you can select the user that you would like to temporarily ban                          |
| duration            | In this option you can enter the duration of the ban, times such as `10m`, `12h` or `4d` are supported |

{% hint style="info" %}
After the selected time, the bot will automatically unban the user, the user will not be automatically re-added to the server
{% endhint %}

## Mute Commands

### Time-out a User

You can time-out a user with the `/mute add` command. After you used the command, you will get a form to fill out the reason of the timeout.

| Command Option Name | Function                                                                                                      |
| ------------------- | ------------------------------------------------------------------------------------------------------------- |
| user                | In this option you can select the user that you would like to mute                                            |
| duration            | In this option you can enter the duration of the timeout. Times such as `10s`, `10min` or `10h` are supported |

#### Prefix Mute Command

You can also use the `!mute` prefix command to mute a user.

The template for this command is: `!mute @user time reason`

| Command Option Name | Function                                                                                                                |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| @user               | For this option you can @mention the user that you would like to mute                                                   |
| Time                | For this option you can enter the time to mute the selected user. The times `1m`, `10m`, `1h`, `1d`, `7d` are supported |
| Reason              | For this option you can enter the reason of the mute                                                                    |

### Unmute a User

You can remove a time-out with the `/mute remove` command. After you used the command, you will get a form to fill out the reason of the timeout removal.&#x20;

| Command Option Name | Function                                                       |
| ------------------- | -------------------------------------------------------------- |
| user                | In this option you can select the user to remove the mute from |

## Role Commands

### Create a Role

You can create a role with the `/create role` command.&#x20;

| Command Option Name | Function                                                                                                 |
| ------------------- | -------------------------------------------------------------------------------------------------------- |
| name                | In this option you can enter the name of your new role                                                   |
| mentionable         | In this option you can select whether or not this role should be mentionable by @everyone in your server |
| display             | In this option you can select whether or not this role should be displayed separately from other users   |

### Add a Role to a User

You can add a role to a user with the `/role add` command.&#x20;

| Command Option Name | Function                                                                    |
| ------------------- | --------------------------------------------------------------------------- |
| user                | In this option you can select the user that you would like to give the role |
| role                | In this option you can select the role you would like to give the user      |

### Remove a Role from a User

You can remove a role from a user with the `/role remove` command.&#x20;

| Command Option Name | Function                                                                        |
| ------------------- | ------------------------------------------------------------------------------- |
| user                | this option you can select the user that you would like to remove the role from |
| role                | In this option you can select the role you would like to remove from the user   |

### Temporarily Add a Role to a User

You can temporarily add a role to a user with the `/role temp` command.&#x20;

| Command Option Name | Function                                                                                                                               |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| user                | In this option you can select the user that you would like to temporarily give the role                                                |
| role                | In this option you can select the role you would like to temporarily give the user                                                     |
| time                | In this option you can enter the time that you would like to give the user the role. Times such as `10m`, `12h` and `4d` are supported |

### Add a Role to All User

You can add a role to ALL users in your server with the `/role everyone-add` command.&#x20;

{% hint style="danger" %}
This will instantly add the selected role to ALL users in your server. Make sure it does not have any dangerous permissions!&#x20;
{% endhint %}

{% hint style="success" %}
Bulk actions can only be done by users with the `manage server` or `administrator` permissions.&#x20;
{% endhint %}

| Command Option Name | Function                                                                                                                           |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| role                | In this option you can select the role you would like to add to all users                                                          |
| ignore-bots         | In this option you can select if you want to not add the role to bots. If you select nothing, the role will also be added to bots. |

### Remove a Role from All Users

You can remove a role from ALL users in your server with the `/role everyone-remove` command.&#x20;

{% hint style="danger" %}
This will remove the role from ALL users in the server and cannot be undone.&#x20;
{% endhint %}

{% hint style="success" %}
Bulk actions can only be done by users with the `manage server` or `administrator` permissions.&#x20;
{% endhint %}

| Command Option Name | Function                                                                                                                                    |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| role                | In this option you can select the role you would like to remove from all users                                                              |
| ignore-bots         | In this option you can select if you want to not remove the role from bots. If you select nothing, the role will also be removed from bots. |

## Voice Commands

### Deaf a User

You can deaf a user with the `/voice deaf` command.&#x20;

| Command Option Name | Function                                                           |
| ------------------- | ------------------------------------------------------------------ |
| user                | In this option you can select the user that you would like to deaf |

### Undeaf a User

You can undeaf a user with the `/voice undeaf` command.&#x20;

| Command Option Name | Function                                                             |
| ------------------- | -------------------------------------------------------------------- |
| user                | In this option you can select the user that you would like to undeaf |

## Channel Commands

### Create a Channel

You can create a channel with the `/create channel` command.&#x20;

| Command Option Name | Function                                                                                                            |
| ------------------- | ------------------------------------------------------------------------------------------------------------------- |
| name                | In this option you can enter the name of your new channel                                                           |
| type                | In this option you can select the type of your new channel                                                          |
| channel-category    | In this option you can select the category of your new channel                                                      |
| channel-topic       | In this option you can enter the topic of your channel, this does not work for voice channels and category channels |

### Lock a Channel

You can lock a channel for messages with the `/channel lock` command.&#x20;

### Unlock a Channel

You can unlock a channel with the `/channel unlock` command.&#x20;

### Hide a Channel

You can hide a channel with the `/channel hide` command.

| Command Option Name | Function                                          |
| ------------------- | ------------------------------------------------- |
| everyone            | In this option, please select your @everyone role |

### Unhide a Channel

You can unhide a channel with the `/channel unhide` command.&#x20;

| Command Option Name | Function                                          |
| ------------------- | ------------------------------------------------- |
| everyone            | In this option, please select your @everyone role |

### Edit Slowmode in a Channel

You can edit the slowmode in a channel with the `/slowmode` command.&#x20;

| Command Option Name | Function                                                                   |
| ------------------- | -------------------------------------------------------------------------- |
| channel             | In this option you can optionally select a channel to edit the slowmode of |

### Purge Messages in a Channel

You can purge up to 100 messages in a channel with the `/purge` command.&#x20;

| Command Option Name | Function                                                                                    |
| ------------------- | ------------------------------------------------------------------------------------------- |
| amount              | In this option you can select the amount of messages to purge. Max is 100 per command usage |
| channel             | In this option you can optionally select a channel to purge the messages in                 |

{% hint style="warning" %}
The bot can't purge messages older than 14 days.
{% endhint %}

## User Commands

### Change the Nickname of a User

You can change the nickname of a user with the `/user nick` command.

| Command Option Name | Function                                                                                                               |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| user                | In this option you can select the user to change the nickname from                                                     |
| nickname            | In this option you can optionally enter the new nickname of the user. If you leave this blank the nickname will become |

### Kick a User

You can kick a user with the `/kick` command. After you used the command, you will get a form to fill out the reason of the kick.

| Command Option Name | Function                                                           |
| ------------------- | ------------------------------------------------------------------ |
| user                | In this option you can select the user that you would like to kick |

### Warn a User

You can warn a user with the `/warn` command.

| Command Option Name | Function                                                           |
| ------------------- | ------------------------------------------------------------------ |
| user                | In this option you can select the user that you would like to warn |
| reason              | In this option you can enter the reason of the warning             |

### Dehoist a User

The `Dehoist` [user command](/infinitybot-docs/guides/infinitybot-guides/command-guides/how-menu-commands-work.md) can be used to remove characters like "!", "#", "." from a user's username to prevent them from being at the top of the member list.&#x20;

### Stop a user from spamming

If a user is spamming you can quicklly stop them using the Stop Spam [user command](/infinitybot-docs/guides/infinitybot-guides/command-guides/how-menu-commands-work.md). This will give the user a timeout of 1 hour.

### View a Case

When you run a moderation action a 'case' will be created for you. This 'case' can be used later to see what you did, the optional reason and who was involved.&#x20;

<figure><img src="https://2255898787-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZqXmdaTQZknKkvcG0Uxz%2Fuploads%2FzxY1e5Cs9JmkR8wiBIyQ%2Fimage.png?alt=media&amp;token=0123d2a2-2eb4-409c-b68d-4733fb60b363" alt="" width="290"><figcaption></figcaption></figure>

Every case has an associated number, for example `#3`, this number can be used in the `/case view` command to get the information about that case.

| Command Option Name | Function                                                                     |
| ------------------- | ---------------------------------------------------------------------------- |
| number              | In this option you can enter the number of the case to get information about |

### Delete a Case

You can also delete a case with the `/case remove` command.

| Command Option Name | Function                                                                    |
| ------------------- | --------------------------------------------------------------------------- |
| number              | In this option you can enter the number of the case that you want to delete |

### Get a User's Moderation History

If a user is moderated by one of the commands above, a note will display in the user's moderation history.&#x20;

<figure><img src="https://2255898787-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZqXmdaTQZknKkvcG0Uxz%2Fuploads%2FClG8rj6I1gs6GnuBXMIY%2Fimage.png?alt=media&amp;token=0c76b31c-db80-4833-8211-b83505fd5cd7" alt="" width="351"><figcaption></figcaption></figure>

You can view a user's moderation history with the `/user history` command.

| Command Option Name | Function                                                       |
| ------------------- | -------------------------------------------------------------- |
| user                | In this option you can select the user to get the history from |

### Clear a User's Moderation History

You can clear the moderation history of a user with the `/user clear-history` command.&#x20;

| Command Option Name | Function                                                         |
| ------------------- | ---------------------------------------------------------------- |
| user                | In this option you can select the user to clear the history from |

## Server Commands

### Lockdown The Server

You can lockdown the server with the `/lockdown` command. Discord will then prevent the selected action(s).&#x20;

| Command Option Name | Function                                                                   |
| ------------------- | -------------------------------------------------------------------------- |
| action              | In this action you can select whether you want to add or remove a lockdown |
| from-what           | In this option you can select what lockdown you would like to add/remove.  |

<figure><img src="https://2255898787-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZqXmdaTQZknKkvcG0Uxz%2Fuploads%2F9A3SNUy62GHf5FMnVu3T%2Fimage.png?alt=media&amp;token=8b4d4c0b-2f50-4dff-a4c6-36bba929df35" alt=""><figcaption></figcaption></figure>
