mirror of
https://github.com/RPCS3/discord-bot.git
synced 2026-01-31 01:25:22 +01:00
Fixed a pretty bad piracy check bug
This commit is contained in:
5
bot.py
5
bot.py
@@ -114,6 +114,8 @@ async def on_message(message: Message):
|
||||
OnMessage event listener
|
||||
:param message: message
|
||||
"""
|
||||
if await piracy_check(message):
|
||||
return
|
||||
# Self reply detect
|
||||
if message.author.id == bot.user.id:
|
||||
return
|
||||
@@ -124,8 +126,6 @@ async def on_message(message: Message):
|
||||
except IndexError:
|
||||
print("Empty message! Could still have attachments.")
|
||||
|
||||
await piracy_check(message)
|
||||
|
||||
# Code reply
|
||||
code_list = []
|
||||
for matcher in re.finditer(id_pattern, message.content, flags=re.IGNORECASE):
|
||||
@@ -249,6 +249,7 @@ async def piracy_check(message: Message):
|
||||
rules=rules_channel.mention
|
||||
))
|
||||
await report("Piracy", message, None, attention=False)
|
||||
return True
|
||||
break
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user