From b33317314ff78f59ee878360ebb774515ee9d7cd Mon Sep 17 00:00:00 2001 From: Paillat Date: Mon, 6 Mar 2023 23:21:54 +0100 Subject: [PATCH] reactions --- code/makeprompt.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/makeprompt.py b/code/makeprompt.py index 25bc42d..c4064de 100644 --- a/code/makeprompt.py +++ b/code/makeprompt.py @@ -211,12 +211,14 @@ async def chat_process(self, message): if response != "": if tts: tts = True else: tts = False - await message.channel.send(response, tts=tts) #if the response starts with +, we add the characzer after 1+as the reaction, assuming it is a valid emoji if response[0] == "+": try: await message.add_reaction(response[1]) + response = response[2:] except: pass + await message.channel.send(response, tts=tts) + else: await message.channel.send("The AI is not sure what to say (the response was empty)")