mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-20 16:00:29 +00:00
Fix AutoMod audit log entry error due to empty channel_id
This commit is contained in:
parent
c8e2644497
commit
34a434b2af
@ -652,7 +652,9 @@ class AuditLogEntry(Hashable):
|
||||
):
|
||||
channel_id = utils._get_as_snowflake(extra, 'channel_id')
|
||||
channel = None
|
||||
if channel_id is not None:
|
||||
|
||||
# May be an empty string instead of None due to a Discord issue
|
||||
if channel_id:
|
||||
channel = self.guild.get_channel_or_thread(channel_id) or Object(id=channel_id)
|
||||
|
||||
self.extra = _AuditLogProxyAutoModAction(
|
||||
|
Loading…
x
Reference in New Issue
Block a user