Remove unused try except blocks in modlog.create_case() usage (#4095)

This commit is contained in:
jack1142
2020-08-05 20:40:52 +02:00
committed by GitHub
parent 0cc04706f6
commit 6cef336417
4 changed files with 199 additions and 264 deletions

View File

@@ -56,21 +56,17 @@ class Events(MixinMeta):
"Failed to ban member for mention spam in server {}.".format(guild.id)
)
else:
try:
await modlog.create_case(
self.bot,
guild,
message.created_at,
"ban",
author,
guild.me,
_("Mention spam (Autoban)"),
until=None,
channel=None,
)
except RuntimeError as e:
print(e)
return False
await modlog.create_case(
self.bot,
guild,
message.created_at,
"ban",
author,
guild.me,
_("Mention spam (Autoban)"),
until=None,
channel=None,
)
return True
return False