Added reactions

This commit is contained in:
Paillat
2023-03-06 22:56:13 +01:00
parent ff0b73cbd9
commit 610f5573fa
2 changed files with 6 additions and 0 deletions

View File

@@ -206,5 +206,9 @@ async def chat_process(self, message):
if tts: tts = True
else: tts = False
await message.channel.send(response, tts=tts)
#if the response matches +[emoji] at the beginning, we react with the emoji
if re.match(r"\+\[.*\]", response):
emoji = re.search(r"\[(.*)\]", response).group(1)
await message.add_reaction(emoji)
else:
await message.channel.send("The AI is not sure what to say (the response was empty)")