list warns on user join
@@ -30,21 +30,21 @@ class Events:
if contains_fs_repo_url != None:
try:
await self.bot.delete_message(message)
- except discord.errors.NotFound as e:
+ except discord.errors.NotFound:
pass
await self.bot.send_message(message.author, "Please read #welcome-and-rules. You cannot link to tools used for piracy, therefore your message was automatically deleted.", embed=embed)
await self.bot.send_message(self.bot.mods_channel, "**Bad URL**: {} posted a freeShop Repo URL in {} @here (message deleted)".format(message.author.mention, message.channel.mention), embed=embed)
if contains_piracy_tool_mention:
try:
await self.bot.delete_message(message)
- except discord.errors.NotFound as e:
+ except discord.errors.NotFound:
pass
await self.bot.send_message(message.author, "Please read #welcome-and-rules. You cannot mention tools used for piracy, therefore your message was automatically deleted.", embed=embed)
await self.bot.send_message(self.bot.mods_channel, "**Bad tool**: {} mentioned a piracy tool in {} @here (message deleted)".format(message.author.mention, message.channel.mention), embed=embed)
if contains_piracy_site_mention or contains_piracy_url_mention:
try:
await self.bot.delete_message(message)
- except discord.errors.NotFound as e:
+ except discord.errors.NotFound:
pass
await self.bot.send_message(message.author, "Please read #welcome-and-rules. You cannot mention sites used for piracy directly, therefore your message was automatically deleted.", embed=embed)
await self.bot.send_message(self.bot.mods_channel, "**Bad site**: {} mentioned a piracy site directly in {} @here (message deleted)".format(message.author.mention, message.channel.mention), embed=embed)
@@ -52,7 +52,7 @@ class Events:
if is_help_channel:
try:
await self.bot.delete_message(message)
- except discord.errors.NotFound as e:
+ except discord.errors.NotFound:
pass
await self.bot.send_message(message.author, "Please read #welcome-and-rules. You cannot mention sites used for piracy in the help-and-questions channels directly or indirectly, therefore your message was automatically deleted.", embed=embed)
await self.bot.send_message(self.bot.mods_channel, "**Bad site**: {} mentioned a piracy site indirectly in {} @here{}".format(message.author.mention, message.channel.mention, " (message deleted)" if is_help_channel else ""), embed=embed)
