mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-22 02:37:57 -05:00
Remove unused try except blocks in modlog.create_case() usage (#4095)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user