Skip to content

Conversation

@vcarl
Copy link
Member

@vcarl vcarl commented Jan 17, 2026

The logic here was checking whether a return value existed, but I got things twisted as I refactored and had added a "left" case. So members that leave the server are being incorrectly logged as kicked.

Strictly speaking, we could in fact open a new thread for every member, thus capturing their entire membership journey — when they join, when the leave (or are removed), any automod triggers… The downside is that it becomes a little bit more "proactive surveillance" vs "incident recording", and in general I prefer to avoid surveillance

@what-the-diff
Copy link

what-the-diff bot commented Jan 17, 2026

PR Summary

  • Improvement of the 'handleBanAdd' function
    The function has been enhanced by eliminating unnecessary safety measures when fetching audit logs, simplifying its operation.

  • Enhanced determination of 'executor' and 'reason'
    The logic for determining who executed the ban and the reason for the ban has been unified. Now, this information is gathered directly from the audit log just after it's fetched, improving the speed and efficiency of the operation.

  • Check added to prevent self-banning
    A new preventative measure has been implemented to interrupt the processing if it's detected the user being banned is the bot itself. This will help avoid situations where the bot unintentionally bans itself.

  • Upgraded error logging
    The error logging for the system has been bettered. Now, it provides a warning when there's an issue accessing the audit logs due to permissions. This will help quickly identify and solve these type of situations.

  • Simplification of the 'handleMemberRemove' function
    Unnecessary safety measures when audit logs weren't accessible have been removed from the 'handleMemberRemove' function. Now, it simply checks if the user has left, enhancing its performance.

@vcarl vcarl merged commit 425a647 into main Jan 17, 2026
6 checks passed
@vcarl vcarl deleted the vc-still-more-fixes branch January 17, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants