Merge pull request #11 from laToufff/main

fix replies
This commit is contained in:
Paillat
2022-12-08 10:05:22 +01:00
committed by GitHub

View File

@@ -293,6 +293,9 @@ async def on_message(message: discord.Message):
c.execute("SELECT channel_id FROM data WHERE guild_id = ?", (message.guild.id,)) c.execute("SELECT channel_id FROM data WHERE guild_id = ?", (message.guild.id,))
try : replied_message: discord.Message = await message.to_reference() try : replied_message: discord.Message = await message.to_reference()
except : replied_message = None except : replied_message = None
else :
if replied_message.author.id != bot.user.id:
replied_message = None
if str(message.channel.id) != str(c.fetchone()[0]): if str(message.channel.id) != str(c.fetchone()[0]):
#check if the message is a mention or if the message replies to the bot #check if the message is a mention or if the message replies to the bot
if message.content.find("<@1046051875755134996>") != -1 or replied_message != None: if message.content.find("<@1046051875755134996>") != -1 or replied_message != None: