undo accidental removal of changes
@@ -78,7 +78,7 @@ class Events:
'fleashop',
'ciangle',
'fieashop',
- 'unbanmii',
+ 'switchthem.es',
)
# terms that should cause a notice but not auto-delete
@@ -103,6 +103,13 @@ class Events:
'.gif',
'.png',
'.bmp',
+ '.tiff',
+ '.psd',
+ )
+
+ # unbanning stuff
+ unbanning_stuff = (
+ 'unbanmii',
)
# I hate naming variables sometimes
@@ -138,7 +145,9 @@ class Events:
contains_piracy_tool_mention = any(x in msg_no_separators for x in self.piracy_tools)
contains_piracy_tool_alert_mention = any(x in msg_no_separators for x in self.piracy_tools_alert)
contains_piracy_site_mention_indirect = any(x in msg for x in ('iso site', 'chaos site',))
- contains_misinformation_url_mention = any(x in msg_no_separators for x in ('gudie.racklab', 'guide.racklab', 'gudieracklab', 'guideracklab', 'lyricly.github.io', 'lyriclygithub', 'strawpoii',))
+ contains_misinformation_url_mention = any(x in msg_no_separators for x in ('gudie.racklab', 'guide.racklab', 'gudieracklab', 'guideracklab', 'lyricly.github.io', 'lyriclygithub', 'strawpoii', 'hackinformer.com',))
+ contains_unbanning_stuff = any(x in msg_no_separators for x in self.unbanning_stuff)
+
# contains_guide_mirror_mention = any(x in msg for x in ('3ds-guide.b4k.co',))
contains_drama_alert = any(x in msg_no_separators for x in self.drama_alert)
@@ -194,6 +203,16 @@ class Events:
except discord.errors.Forbidden:
pass # don't fail in case user has DMs disabled for this server, or blocked the bot
await self.bot.send_message(self.bot.messagelogs_channel, "**Bad site**: {} mentioned a piracy site indirectly in {}{}".format(message.author.mention, message.channel.mention, " (message deleted)" if is_help_channel else ""), embed=embed)
+ if contains_unbanning_stuff:
+ try:
+ await self.bot.delete_message(message)
+ except discord.errors.NotFound:
+ pass
+ try:
+ await self.bot.send_message(message.author, "Please read {}. You cannot mention sites, programs or services used for unbanning, therefore your message was automatically deleted.".format(self.bot.welcome_channel.mention), embed=embed)
+ except discord.errors.Forbidden:
+ pass # don't fail in case user has DMs disabled for this server, or blocked the bot
+ await self.bot.send_message(self.bot.messagelogs_channel, "**Bad site**: {} mentioned an unbanning site/service/program directly in {} (message deleted)".format(message.author.mention, message.channel.mention), embed=embed)
# check for guide mirrors and post the actual link
urls = re.findall(r'(https?://\S+)', msg)
