# Configuring a moderation action log

## Permissions

There are some permissions that you will need to grant yzbot and for yourself to have before proceeding. Yzbot must have the EMBED\_LINKS permission and you must have the MANAGE\_SERVER or ADMINISTRATOR permission, or be the owner.

## What will yzbot log?

So, which actions will yzbot log? By default, it will log every time that a moderation action is performed with yzbot. The specific commands are as follows:

* ban
* kick
* mute
* unban
* hackban
* softban
* unmute (auto unmute too)

## Setting up a mod log

To set up a default mod log that will log all moderation actions, there is one command that you need to enter:

```
;modlog set <channel>
```

Let's see an example:

![](https://2456777771-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LBvfJXg-P2-AZKX2ol2%2F-LE-e6rkMobJOHg8zJyE%2F-LE-taAwuPs5y2Wa2jQ0%2Fimage.png?alt=media\&token=83ea1311-697b-4190-a4f3-40737ea7d62b)

This will set the moderation log to #general. Now let's perform a moderation action.

![](https://2456777771-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LBvfJXg-P2-AZKX2ol2%2F-LE-e6rkMobJOHg8zJyE%2F-LE-to4TnN68CIm2u5aT%2Fimage.png?alt=media\&token=14088b18-9189-4b43-84b4-344da2197e66)

Yzbot got banned, and the moderation log got posted.

## Disabling and re-enabling certain logs

So you might not want yzbot to log certain actions, for example if a user got unmuted or hackbanned. In this example I'll demonstrate what it would look like if I disabled the unban log. To disable a log just type the following:

```
;modlog disable <log>
```

Where \<log> is one of  the logs I mentioned in the section 'What will yzbot log?'.&#x20;

![](https://2456777771-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LBvfJXg-P2-AZKX2ol2%2F-LE-e6rkMobJOHg8zJyE%2F-LE-v5rQIs3_JQ6t12rM%2Fimage.png?alt=media\&token=0392e9d8-9257-4d1c-8473-c28d8cb54314)

In the command I replaced \<log> with unban because that's the command that I don't want logged. Now let's test this.

![](https://2456777771-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LBvfJXg-P2-AZKX2ol2%2F-LE-e6rkMobJOHg8zJyE%2F-LE-vQ6jJgBd_bgONBDT%2Fimage.png?alt=media\&token=429a5240-c14e-43cc-ace1-d065dc40543e)

I'm in the general channel, and there is no mod log. That means that the log was successfully disabled. Now let's re-enable it. To do this, type the following:

```
;modlog enable <log>
```

Where, once again, \<log> is one of  the logs I mentioned in the section 'What will yzbot log?'. I will re-enable it and then unban yzbot again, after banning it.

![](https://2456777771-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LBvfJXg-P2-AZKX2ol2%2F-LE-e6rkMobJOHg8zJyE%2F-LE-vrfhTqdUnbB13MKE%2Fimage.png?alt=media\&token=0b4cbc92-fcdb-4c8f-a4d7-ca78d1b9084f)

Now let's unban yzbot.&#x20;

![](https://2456777771-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LBvfJXg-P2-AZKX2ol2%2F-LE-e6rkMobJOHg8zJyE%2F-LE-w0S70SZpnP2_HIl6%2Fimage.png?alt=media\&token=299c63cd-7c9a-496c-8c9c-146dd04d7b1c)

Yzbot was successfully unbanned, and the moderation log was posted.&#x20;

## Listing disabled logs

If you have disabled some moderation logs and you want to know which ones you have disabled exactly, type this command to do so:

```
;modlog listdisabled
```

![](https://2456777771-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LBvfJXg-P2-AZKX2ol2%2F-LE-e6rkMobJOHg8zJyE%2F-LE-wgdsUTNvQnWBiOhy%2Fimage.png?alt=media\&token=e679f08b-c610-451e-92b4-8b5b5e35ad38)

If there is more than one log, yzbot will list the logs which are disabled separated by a comma for every log.

## Removing the mod log

You can stop yzbot from sending moderation logs altogether by just typing the command:

```
;modlog remove
```

After that, unless you choose to set the mod log again, yzbot will no longer post logs of moderation actions.
