fix(moderation): fixed error if entry.reason is none
Some checks failed
Pylint / Pylint (push) Failing after 1m12s
Some checks failed
Pylint / Pylint (push) Failing after 1m12s
This commit is contained in:
parent
f25f8cb095
commit
2c6cb7f9cb
1 changed files with 4 additions and 1 deletions
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue