-
Notifications
You must be signed in to change notification settings - Fork 6
Track improvements: formatting, kicks/bans, stats #246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
vcarl
commented
Jan 17, 2026
- Add kick/ban event logging to user threads
- Improve report message formatting
- Move reaction list to quoted message
- Include message stats in the tiny preview
- Move attribution label ("by vcarl") for better readability
Listen for GuildBanAdd and GuildMemberRemove events to log external moderation actions (kicks/bans performed via Discord UI) to user threads. Uses audit log to identify executor and distinguish kicks from voluntary leaves. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds kick/ban event logging to user threads and improves report message formatting. The changes track moderation actions (kicks and bans) by listening to Discord events, querying audit logs for details, and logging them to persistent user threads.
Changes:
- New moderation action logger that captures kick/ban events and reports them to user threads
- Improved report formatting by moving reactions and attachments to quoted messages, reorganizing attribution labels, and adding stats to message previews
- Added GuildModeration intent to enable listening to ban/kick events
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| app/discord/modActionLogger.ts | New file that handles Discord ban/kick events, queries audit logs, and reports actions to user threads |
| app/helpers/modLog.ts | Adds reportModAction function for logging mod actions, moves attachment/reaction embeds to quoted messages, improves formatting of report messages |
| app/helpers/discord.ts | Refactors attachment description formatting and removes "Reactions" title from reaction embeds |
| app/discord/gateway.ts | Registers the new mod action logger on bot initialization |
| app/discord/client.server.ts | Adds GuildModeration intent to enable ban/kick event listening |
| app/discord/automod.ts | Changes log level from debug to info for timeout action skipping |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>