From 518a302f03e761da4e4c392d23825a5223b2817e Mon Sep 17 00:00:00 2001 From: Unstable Kitsune Date: Wed, 24 Sep 2025 00:42:56 -0400 Subject: [PATCH] Add logging --- logging.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 logging.md diff --git a/logging.md b/logging.md new file mode 100644 index 0000000..fcb92c4 --- /dev/null +++ b/logging.md @@ -0,0 +1,42 @@ +# Logging Cog + +The Logging cog is a comprehensive, background auditing tool designed to provide administrators with a clear record of important server events. It listens for various actions and sends formatted logs to a designated private channel. + +--- + +## 1. Features + +- **Comprehensive Event Tracking:** Logs a wide range of important server events, including message edits/deletes, member joins/leaves, role/nickname changes, voice channel activity, and invite creations. +- **Granular Control:** Administrators can toggle logging for each specific event type on or off, preventing log channel spam and focusing only on the events they care about. +- **DataManager Integration:** Logs timestamps for purgable events (like message logs), making it fully compatible with the `DataManager` cog. +- **Hybrid Commands:** All administrative commands work with both slash commands (`/`) and your bot's prefix (`[p]`). + +--- + +## 2. Logged Events + +When enabled, the cog will create a log entry for the following events: + +- `on_message_delete`: When a message is deleted. +- `on_message_edit`: When a message's content is edited. +- `on_member_join`: When a new user joins the server. +- `on_member_remove`: When a user leaves, is kicked, or is banned from the server. +- `on_member_update`: When a user's nickname or roles are changed. +- `on_voice_state_update`: When a user joins, leaves, or moves between voice channels. +- `on_invite_create`: When a new server invite is created. + +--- + +## 3. Admin Commands + +### `/loggingset` + +The main command group for configuring the Logging system. Requires `Manage Server` permissions. + +**Prefix Version:** `[p]loggingset` or `[p]logset` + +- `/loggingset channel <#channel>` + - Sets the private channel where all log messages will be sent. This is a **required** setup step. +- `/loggingset toggle ` + - Toggles logging for a specific event on or off. + - **`event_name`**: The name of the event to toggle (e.g., `on_message_delete`). You can view a list of valid events by running the command without an event name. \ No newline at end of file