Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moderation: ignore non-moderation audit log events (#1843)
* moderation: ignore non-timeout audit log member update events Explicitly check for AuditLogChangeKeyCommunicationDisabledUntil to differentiate between audit log member update events that change a member's timeout and others AuditLogActionMemberUpdate fires for any member update event, including things like role and nickname changes Signed-off-by: Galen CC <galen8183@gmail.com> * moderation: slices.ContainsFunc over manual iteration for timeout check Prefer slices.ContainsFunc over manual iteration to check audit log member update event changes for new timeouts Fix non-timeout changes immediately returning regardless of other changes possibly being a new timeout Signed-off-by: Galen CC <galen8183@gmail.com> * moderation: ignore audit log events without a target user All moderation related audit log events will have a target user, make sure we ignore any events without a TargetID or a non-user target. Signed-off-by: Galen CC <galen8183@gmail.com> --------- Signed-off-by: Galen CC <galen8183@gmail.com>
- Loading branch information