# create-muterole

This command sets up a role to be used as the mute role for the server. It will edit the permissions of all channels to deny the role from sending messages.

## Required permissions

MoonlightBot requires the following permissions to successfully execute this command:

* Manage Channels
* Manage Roles

For the successful setup of the mute role, MoonlightBot requires permission to **Manage Permissions** in channels, as well as the following permissions enabled, which will be denied to the mute role:

* Send Messages
* Send Messages In Threads
* Create Public Threads
* Create Private Threads
* Add Reactions
* Use Application Commands
* Speak

Channels where these conditions are not met will be skipped in the permission override setup procedure.

By default, a user is required to have the following permissions to use this command:

* Manage Server

For more information on editing permission requirements for specific users/roles, refer to the [permissions tutorial](/docs/get-started/permission-tutorial.md)

## Syntax

```
/create-muterole [role]
```

### Options

* `role`: The role to be used as the mute role. If not provided, a new role will be created

## Logs

*This command does not trigger any log events*

For more information on setting up those logs, refer to the [log setup tutorial](/docs/readme.md#logging)

## Troubleshooting

To troubleshoot why a muted member was able to send a message in an unintended channel despite having the role set up, check the following:

* Does the muted role have the `Send messages` permission?
  * Check in Server Settings > Roles > \[Your Mute Role] > Permissions; If so, disable it.
* Does the muted role have a category-specific override with the `Send messages` permission?
  * Check by Right Clicking on the Channel's Category > Edit Category > Permissions; If so, remove the role override or disable the permission.
* Does the muted role have a channel-specific override, or is the channel not synced to the category?
  * Check by Right Clicking on the Channel > Edit Channel > Permissions; If so, sync the channel to the category, remove the override or disable the permission.


---

# 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://moonlightbot.gitbook.io/docs/management-commands/create-muterole.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.
