# Yzbot Logging

### What can yzbot log?

Yzbot has a fully-fledged, highly configurable logging system. It can log 17 different types of action, each one can be disabled or enabled, and there is the ability to stop yzbot from logging message activity in certain channels (message delete, edit, bulk delete) such as in secret, Admin only channels. Yzbot also supports **attachment logging** but it is DISABLED BY DEFAULT.

For anybody interested, a list of actions is below:

Member Join, Member Leave, Member Role Add, Member Role Remove, Avatar Change, New Role, Deleted Role, Role Colour Update, Nickname Change, Username Change, Channel Name Change, New Channel, Deleted Channel, Role Name Change, Message Delete, Message Delete Bulk, Message Edit.

### Managing the channel

All you need to do for this is to set a channel for yzbot to perform its logging in. Doing this is as simple as typing `;logs set <#channel>`, replacing <#channel> with the channel that you want the logs to be sent to.

<div align="left"><img src="https://2214197333-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4KHeDkm4oqokce8Df5%2F-M4O25nXhpeGA9G78FR2%2F-M4OHNCz9A4HyUULy1gH%2Fimage.png?alt=media&#x26;token=91211dde-66ea-4286-890e-02715ce13647" alt=""></div>

If you no longer want yzbot to perform its logging actions, just type `;logs remove` and the setting is deleted.

<div align="left"><img src="https://2214197333-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4KHeDkm4oqokce8Df5%2F-M4O25nXhpeGA9G78FR2%2F-M4OI8IQsVmD8ScApgWI%2Fimage.png?alt=media&#x26;token=300142b9-fb10-4b33-bd55-436daecf4ac0" alt=""></div>

### Attachment Logging

Please note - If you enable this I'm not responsible for any images/videos that yzbot logs, the onus is on you.

Many bots don't log deleted attachments - well let's fix that! Yzbot can log deleted images and videos (it does NOT and will not log text files, audio files or other types). To enable this, simply type `;logs toggleattachments`. It may take up to 30 seconds for attachments to start being logged but from then, all deleted images/videos will be logged.&#x20;

![](https://2214197333-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4KHeDkm4oqokce8Df5%2F-M5fOt12H1kwvt69L7Ar%2F-M5fTvlqCPbbaoW8uRz1%2Fimage.png?alt=media\&token=7992e374-a73f-47e8-b30e-47a67b6de0f3)

### Enabling/Disabling Certain Log Types

If there are some things that you believe are clogging up the logs, things you don't want to be logged, or otherwise, you can easily disable them (and reenable them if you change your mind later on)! All log types are enabled by default.&#x20;

Before I go any further, I think it is a good idea to place here a reference list of all the log types, in a valid format for the enable/disable command:&#x20;

memberjoin, memberleave, memberroleadd, memberroleremove, avatarchange, newrole, deletedrole, rolecolourupdate, nicknamechange, usernamechange, channelnamechange, newchannel, deletedchannel, rolenamechange, messagedelete, messagedeletebulk, messageedit&#x20;

To disable a certain log type, just type `;logs disable <type>`. Like so:

<div align="left"><img src="https://2214197333-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4KHeDkm4oqokce8Df5%2F-M5fOt12H1kwvt69L7Ar%2F-M5fVTuHk85TTw9Ebq2t%2Fimage.png?alt=media&#x26;token=0f573108-364a-4c60-bb93-0bd3c2557098" alt=""></div>

People who change their profile picture will no longer spam your logs. (NOT me).

If you have a change of heart and you want to reenable avatar changing logs, do it like so: `;logs enable <type>`. While obvious, I feel I should point it out - you can only reenable log types that are disabled.&#x20;

<div align="left"><img src="https://2214197333-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4KHeDkm4oqokce8Df5%2F-M5fOt12H1kwvt69L7Ar%2F-M5fVnS4CGOTwnrt2pOv%2Fimage.png?alt=media&#x26;token=52eb0b99-3d35-4da0-8054-589813f4cc12" alt=""></div>

### Hiding Channels From Logging

Is there a secret Admins only channel in your server whose message activity you don't want to be logged (delete, edit, bulk delete)? If so, you can stop yzbot from doing just that with the `;logs disablechannel <channel>` command:

![](https://2214197333-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4KHeDkm4oqokce8Df5%2F-M5fOt12H1kwvt69L7Ar%2F-M5fWwFOK8rKPSkcM2Nw%2Fimage.png?alt=media\&token=3c11ea83-9447-473b-bcf2-392333ddeaab)

Excellent! Never worry again about having conversations in Admin chat and having to worry about message edits and deletion. If you want message activity from Admin chat to be logged again though, just type `;logs enablechannel <channel>`.

![](https://2214197333-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4KHeDkm4oqokce8Df5%2F-M5fOt12H1kwvt69L7Ar%2F-M5fX_8wH1Ho2vbtS-S2%2Fimage.png?alt=media\&token=4d4096e4-10ca-4df4-8f3a-b1364af3c161)

### Checking Disabled Logs

To check which log types are disabled, type `;logs listdisabled`.&#x20;

<div align="left"><img src="https://2214197333-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4KHeDkm4oqokce8Df5%2F-M5fOt12H1kwvt69L7Ar%2F-M5fXqSXUfm3mzSEcIJq%2Fimage.png?alt=media&#x26;token=55093c3e-9018-49f7-a216-7e42af634b44" alt=""></div>

If you want to see which channels are disabled from logging, use the `;config` command (note: It will show all settings for the server, so it is advised to do this in a private channel).&#x20;
