fix(moderation): fixed timeout logging
Some checks failed
Pylint / Pylint (push) Failing after 1m12s
Some checks failed
Pylint / Pylint (push) Failing after 1m12s
This commit is contained in:
parent
a036d5b898
commit
a7bd24f783
1 changed files with 5 additions and 2 deletions
|
@ -74,8 +74,11 @@ class Moderation(commands.Cog):
|
|||
elif entry.action == discord.AuditLogAction.unban:
|
||||
moderation_type = 'UNBAN'
|
||||
elif entry.action == discord.AuditLogAction.member_update:
|
||||
duration = entry.after.timed_out_until
|
||||
moderation_type = 'TIMEOUT'
|
||||
if entry.after.timed_out_until is not None:
|
||||
duration = entry.after.timed_out_until
|
||||
moderation_type = 'TIMEOUT'
|
||||
else:
|
||||
moderation_type = 'UNTIMEOUT'
|
||||
else:
|
||||
return
|
||||
await self.mysql_log(entry.guild.id, entry.user.id, moderation_type, entry.target.id, duration, reason)
|
||||
|
|
Loading…
Reference in a new issue