-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add new AuditLogAction types #2427
Conversation
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.
Some comments:
message_id = int(self.extra['message_id']) | ||
elems = { | ||
'channel': self.guild.get_channel(channel_id) or Object(id=channel_id), | ||
'message_id': message_id |
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.
Possibly self.guild._state._get_message()
?
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.
Don't think so.
Audit logs aren't sent via WS events so there's no way to know when exactly to make a cache of the message.
Co-Authored-By: Modelmat <Modelmat@users.noreply.github.com>
Co-Authored-By: Modelmat <Modelmat@users.noreply.github.com>
It's not in description of this PR but it resolves #2426 |
discord/enums.py
Outdated
@@ -341,6 +353,9 @@ def category(self): | |||
AuditLogAction.emoji_update: AuditLogActionCategory.update, | |||
AuditLogAction.emoji_delete: AuditLogActionCategory.delete, | |||
AuditLogAction.message_delete: AuditLogActionCategory.delete, | |||
AuditLogAction.integration_create: AuditLogActionCategory.create, | |||
AuditLogAction.integration_update: AuditLogActionCategoty.update, |
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.
You have a mistype here,
AuditLogActionCategoty
Instead of
AuditLogActionCategory
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.
This was already fixed.
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.
See f9b8b23.
Summary
Adds new audit log entry types specified in discord/discord-api-docs#1191
Also fixes an issue with unknown audit log types with extra data causing an exception.
Checklist