From 553d259bc7cadddecdc8c7eb519ba5949056a135 Mon Sep 17 00:00:00 2001 From: Paillat Date: Tue, 15 Aug 2023 10:41:16 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(makeprompt.py):=20change=20c?= =?UTF-8?q?ondition=20to=20check=20if=20the=20message=20is=20from=20the=20?= =?UTF-8?q?bot=20user=20by=20comparing=20author=20id=20to=20improve=20accu?= =?UTF-8?q?racy=20=F0=9F=94=A5=20chore(makeprompt.py):=20remove=20unnecess?= =?UTF-8?q?ary=20comment=20about=20ignoring=20messages=20from=20bots=20?= =?UTF-8?q?=F0=9F=94=A5=20chore(makeprompt.py):=20remove=20unnecessary=20c?= =?UTF-8?q?omment=20about=20ignoring=20messages=20from=20guild=20or=20dm?= =?UTF-8?q?=20channel=20not=20in=20the=20database?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/makeprompt.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/makeprompt.py b/src/makeprompt.py index c165c87..ed81046 100644 --- a/src/makeprompt.py +++ b/src/makeprompt.py @@ -181,11 +181,9 @@ async def chatgpt_process( async def chat_process(self, message): - # if the message is from a bot, we ignore it - if message.author.bot: + if message.author.id == self.bot.user.id: return - # if the guild or the dm channel is not in the database, we ignore it if isinstance(message.channel, discord.DMChannel): try: curs_data.execute(