-
-
Notifications
You must be signed in to change notification settings - Fork 470
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
feat: add on_audit_log_entry event #1873
feat: add on_audit_log_entry event #1873
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1873 +/- ##
==========================================
- Coverage 33.38% 33.27% -0.12%
==========================================
Files 97 96 -1
Lines 18815 18706 -109
==========================================
- Hits 6282 6225 -57
+ Misses 12533 12481 -52
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
def bans(self): | ||
""":class:`bool`: Alias of :attr:`.moderation`. | ||
|
||
.. versionchanged:: fill in |
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.
2.4 most likely
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.
I thought I replaced that placeholder with 2.4...
@@ -706,18 +706,28 @@ def members(self): | |||
return 1 << 1 | |||
|
|||
@flag_value | |||
def bans(self): | |||
def moderation(self): | |||
""":class:`bool`: Whether guild ban related events are enabled. |
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.
Change description
@@ -1320,6 +1321,15 @@ def parse_guild_delete(self, data) -> None: | |||
self._remove_guild(guild) | |||
self.dispatch("guild_remove", guild) | |||
|
|||
def parse_guild_audit_log_entry_create(self, data) -> None: | |||
guild = self._get_guild(int(data["guild_id"])) | |||
user = self.get_user(data["user_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.
Potentially make a raw event as it depends on user cache state
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
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.
Nevermind, I get it now.
Is this still being worked on? |
Sorry, I thought I could delay working on this PR for later without problems. |
Summary
This PR implements an
on_audit_log_entry
event. Closes #1872.Information
examples, ...).
Checklist
type: ignore
comments were used, a comment is also left explaining why.