Skip to content

Add mod audit logs #222

Closed
Closed

Description

@Zabuzard

For moderators, it is important to be able to easily audit all moderative actions:

  • User was banned
  • User was unbanned
  • User was kicked
  • User was muted
  • User was unmuted
  • User deleted a message of another user

The Discord Audit Log does not provide good filtering tools for that and hence is too verbose as an alternative. The channels #mod_commands and #commands originally have been intended to fulfill this role but mods and staff dont always do their actions via bot-commands but also with the Discord UI. And with the slash commands of this bot the lines will blur even further.

A better alternative is to just let the bot hook on all mentioned actions (regardless how they were triggered in the first place) and log them into a dedicated channel which mods then can easily read and follow.

As far as implementation goes, here is a list of useful JDA methods:

  • onGuildBan, onGuildUnban
  • onGuildMemberRemove
  • onGuildMemberRoleAdd, onGuildMemberRoleRemove
  • onGuildMessageDelete
  • retrieveAuditLogs

Activity

  1. added this to the Improvement phase 1 milestone on Oct 25, 2021
  2. self-assigned this
    on Oct 25, 2021
  3. Zabuzard commented on Oct 25, 2021

    @Zabuzard
    MemberAuthor

    It seems that it is pretty much impossible to use the mentioned events for the functionality. They lack a lot of information (for example who muted an user or who was the author of a message that got deleted).

    More reliable is the Audit Log retrieveAuditLogs but they lack functionality to join the events. So it is extremely difficult to find the entry that corresponds to the given event.

    All in all, it is likely better to just create an active audit-log poller and decorate and filter that.

  4. Zabuzard commented on Oct 25, 2021

    @Zabuzard
    MemberAuthor

    Seems I am hitting rate limiting on viewing the audit log and unfortunately there is no listener for it.

  5. linked a pull request that will close this issueAdd mod audit logs #225on Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementpriority: major

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions