-
Notifications
You must be signed in to change notification settings - Fork 0
AdminProtocol
🌐 English · Deutsch
AdminProtocol is a detailed audit-log style protocol cog: it watches a wide range of administrative actions and user activity on your server and posts a formatted embed into a channel you choose per event. Twenty-eight distinct events — message edits and deletions, channel/thread/role lifecycle, bans, kicks, timeouts, nickname and role changes, voice activity, invites and moderation commands — can each be turned on individually, routed to their own log channel, and have channels, roles or users excluded. Every event is disabled by default, and the whole cog is configured through the PDC Web Dashboard — there are no chat commands. Author: pd-codes · requires Red 3.5.0+ and Python 3.10+.

[p]repo add PDC_Redbot_Cogs https://github.com/pd-codes/PDC_Redbot_Cogs
[p]cog install PDC_Redbot_Cogs AdminProtocol
[p]load AdminProtocol
[p] is your bot's prefix. See Installation for the full Downloader walkthrough. AdminProtocol exposes no prefix or slash commands — all configuration happens in the dashboard (see below).
Events are grouped into four categories. Each row is an independent log event with its own enable switch, target channel and exception lists.
| Event key | Logs |
|---|---|
message_edit |
A message was edited (old/new content, jump link). Bot messages and content-less edits are ignored. |
message_delete |
A message was deleted; the deleter is resolved from the audit log where possible. |
channel_create |
A channel was created. |
channel_delete |
A channel was deleted. |
channel_update |
A channel was modified (name, topic or NSFW flag). |
thread_create |
A thread was created. |
thread_delete |
A thread was deleted. |
thread_update |
A thread was modified (name or archive state). |
| Event key | Logs |
|---|---|
user_join |
A member joined (with account-age estimate). |
user_leave |
A member left (when it was not a kick). |
nickname_change_other |
A member's nickname was changed by someone else. |
nickname_change_self |
A member changed their own nickname. |
role_create |
A role was created. |
role_delete |
A role was deleted. |
role_add |
A role was assigned to a member. |
role_remove |
A role was removed from a member. |
| Event key | Logs |
|---|---|
user_ban |
A member was banned (moderator + reason from audit log). |
user_unban |
A user was unbanned. |
user_kick |
A member was kicked (distinguished from user_leave via the audit log). |
user_timeout |
A timeout was applied or removed (duration formatted). |
mod_command |
A moderation command was used — both prefix (on_command) and slash (on_app_command_completion). |
A command counts as a moderation command when it belongs to the Mod, Admin or AdminUtils cogs, or its name is one of kick, ban, timeout, warn, mute, unmute, unban, purge, purgefast, messagemove.
| Event key | Logs |
|---|---|
voice_join |
A member joined a voice channel. |
voice_leave |
A member left a voice channel (self-leave). |
voice_switch |
A member moved themselves between voice channels. |
voice_move |
A moderator moved a member to another voice channel. |
voice_disconnect |
A moderator disconnected a member from voice. |
voice_status |
Voice status changed (server/self mute, deafen, stream, camera). |
invite_create |
A server invite was created. |
Moderator and reason attribution (bans, kicks, timeouts, channel/thread updates, voice moves/disconnects, deletions) is read from the audit log. The bot needs the View Audit Log permission, and Send Messages in each configured log channel. Audit-log entries are only matched within ~15 seconds of the action.
AdminProtocol stores everything per guild (Red Config, identifier 8912389124) under a single events mapping. Each event holds the following keys:
| Key | Type | Meaning |
|---|---|---|
enabled |
bool | Whether the event is logged (default False). |
channel |
channel ID / null
|
Destination channel for this event's embeds. |
ignored_channels |
list of IDs | Channels excluded from this event. |
ignored_users |
list of IDs | Users (subject or actor) excluded from this event. |
ignored_roles |
list of IDs | Roles excluded — matched against the subject's and actor's roles. |
An embed is only posted when the event is enabled, has a channel set, and the subject/actor/channel/role is not on any ignore list.
AdminProtocol registers with the PDC Web Dashboard on load and re-attaches automatically if the dashboard cog appears later. It exposes one widget, five guild-settings panels and a standalone full-page editor:
| Surface | Mount | Permission | Purpose |
|---|---|---|---|
| Widget "Aktive Log-Events" | Dashboard home (KPI, small) | guild_member |
Counts how many events are currently enabled. |
| Panel "Nachrichten & Kanäle" | guild_settings |
guild_admin |
Enable switch + channel dropdown per message/channel/thread event. |
| Panel "Mitglieder & Rollen" | guild_settings |
guild_admin |
Enable + channel per member/role event. |
| Panel "Moderation" | guild_settings |
guild_admin |
Enable + channel per moderation event. |
| Panel "Sprachkanäle & Einladungen" | guild_settings |
guild_admin |
Enable + channel per voice/invite event. |
| Panel "Ausnahmen" | guild_settings |
guild_admin |
Per active event: ignored channels/roles (multi-select) and ignored user IDs (comma list). |
Standalone page adminprotocol
|
own page (GET/POST) |
manage_guild / bot owner |
Full editor — save each event's enabled flag, channel and all three ignore lists individually. |

The Ausnahmen (exceptions) panel only shows events that are currently active, so enable an event in its category tab first before configuring exclusions for it.
The dashboard panels require guild_admin; the standalone page requires manage_guild (or bot owner). For correct moderator/reason attribution the bot needs View Audit Log, plus Send Messages (and embed permission) in every log channel you assign. AdminProtocol persists only guild settings — channel selections, ignore lists and enable flags — and stores no personal data permanently.
See also: Installation · Dashboard Integration · EventMessages · AdminUtils · Home
PDC_Redbot_Cogs · GitHub · Issues · Web Dashboard · Built for Red-DiscordBot · 🌐 English / Deutsch
🇬🇧 English
General
Cogs
Engagement & Utility
- Birthday
- StatChannels
- ScheduledMsg
- EventLog
- SocialFeed
- Giveaway
- Leveling
- TempVoice
- Starboard
- Suggestions
- LiveAlerts
Moderation
Fun
Web Dashboard
🇩🇪 Deutsch
Allgemein
Cogs
Engagement & Utility
- Birthday
- StatChannels
- ScheduledMsg
- EventLog
- SocialFeed
- Giveaway
- Leveling
- TempVoice
- Starboard
- Suggestions
- LiveAlerts
Moderation
Fun
Web-Dashboard