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 <event_name>
- 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.