🐛 fix(makeprompt.py): change condition to check if the message is from the bot user by comparing author id to improve accuracy

🔥 chore(makeprompt.py): remove unnecessary comment about ignoring messages from bots
🔥 chore(makeprompt.py): remove unnecessary comment about ignoring messages from guild or dm channel not in the database
This commit is contained in:
2023-08-15 10:41:16 +02:00
parent 1b02f27f41
commit 553d259bc7

View File

@@ -181,11 +181,9 @@ async def chatgpt_process(
async def chat_process(self, message): async def chat_process(self, message):
# if the message is from a bot, we ignore it if message.author.id == self.bot.user.id:
if message.author.bot:
return return
# if the guild or the dm channel is not in the database, we ignore it
if isinstance(message.channel, discord.DMChannel): if isinstance(message.channel, discord.DMChannel):
try: try:
curs_data.execute( curs_data.execute(