Skip to content
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

fix(audit_logs)!: channel_id can be None due AutoMod blocking nickname changes #1051

Merged
merged 8 commits into from Jun 3, 2023

Conversation

kingmigdor
Copy link
Contributor

@kingmigdor kingmigdor commented Apr 29, 2023

Summary

Fixes #1038. There's a possibility that channel_id for being None when a nickname change was blocked by AutoMod and this has been logged in the AutoMod log channel.
Also removes some repetition in audit_logs.py

Testing code: https://paste.nextcord.dev/?id=1682809496392755

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
    • I have run task pyright and fixed the relevant issues.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

@Miolus
Copy link
Contributor

Miolus commented May 14, 2023

This is needed since it also leads to hard crashes once an audit_log_entry_create event fires without a channel id.

@EmreTech EmreTech added t: bug Type: bug - something isn't working p: high Priority: high - should be worked on as soon as reasonable s: awaiting review Status: the issue or PR is awaiting reviews t: refactor Type: refactor - this is a code change but does not fix a bug/add features labels Jun 2, 2023
@Skelmis Skelmis merged commit 65ee8af into nextcord:master Jun 3, 2023
10 checks passed
@EmreTech EmreTech removed the s: awaiting review Status: the issue or PR is awaiting reviews label Jun 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p: high Priority: high - should be worked on as soon as reasonable t: bug Type: bug - something isn't working t: refactor Type: refactor - this is a code change but does not fix a bug/add features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Audit log entries with documented channel_id params can now be null?
4 participants