fix(moderation): fixed error if entry.reason is none
Some checks failed
Pylint / Pylint (push) Failing after 1m12s

This commit is contained in:
Seaswimmer 2023-10-04 11:35:49 -04:00
parent f25f8cb095
commit 2c6cb7f9cb
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -62,7 +62,10 @@ class Moderation(commands.Cog):
if entry.user.bot or entry.target.bot: if entry.user.bot or entry.target.bot:
return return
duration = "NULL" duration = "NULL"
reason = entry.reason + " (Audit Log)" if entry.reason:
reason = entry.reason + " (This action was performed without the bot.)"
else:
reason = "This action was performed without the bot."
if entry.action == discord.AuditLogAction.kick: if entry.action == discord.AuditLogAction.kick:
moderation_type = 'KICK' moderation_type = 'KICK'
elif entry.action == discord.AuditLogAction.ban: elif entry.action == discord.AuditLogAction.ban: