diff --git a/src/ChatProcess.py b/src/ChatProcess.py index fb748ea..75bada8 100644 --- a/src/ChatProcess.py +++ b/src/ChatProcess.py @@ -193,15 +193,22 @@ class Chat: return try: await self.message.channel.trigger_typing() + await self.message.add_reaction("🤔") await self.formatContext() await self.createThePrompt() await self.getResponse() await self.processResponse() + await self.message.remove_reaction("🤔", self.message.guild.me) except Exception as e: + try: + self.message.remove_reaction("🤔", self.message.guild.me) + except: + pass await self.message.channel.send( - f"""An error occured while processing your message. Please check your settings and try again. If the issue persists, please join uor discord server here: https://discord.gg/pB6hXtUeDv and send the following logs: + f"""An error occured while processing your message, we are sorry about that. Please check your settings and try again. If the issue persists, please join uor discord server here: https://discord.gg/pB6hXtUeDv and send the following logs: ``` {e} -```""" +```""", + delete_after=4, ) raise e diff --git a/src/cogs/chat.py b/src/cogs/chat.py index 3082453..d67529a 100644 --- a/src/cogs/chat.py +++ b/src/cogs/chat.py @@ -107,7 +107,7 @@ class Chat(discord.Cog): if message.content.startswith("botator!unban"): user2ban = message.content.split(" ")[1] await banusr.unbanuser(user2ban) - await message.chafnnel.send(f"User {user2ban} unbanned !") + await message.channel.send(f"User {user2ban} unbanned !") return if str(message.author.id) in banusr.banend_users: await asyncio.sleep(2)