Update code.py

This commit is contained in:
Paillat
2022-12-06 15:40:57 +01:00
parent 39cbfe8416
commit 8c644f7f40

View File

@@ -399,9 +399,6 @@ async def on_message(message):
presence_penalty=float(presence_penalty), presence_penalty=float(presence_penalty),
stop=[" Human:", " AI:", "AI:", "Human:"] ) stop=[" Human:", " AI:", "AI:", "Human:"] )
#send the response #send the response
#wait a random amount of time between 0 and 2 seconds in order to make the bot look more human
#dont show that the bot is typing anymore
await asyncio.sleep(random.randint(0, 2))
if response["choices"][0] ["text"] != "": if response["choices"][0] ["text"] != "":
#check if tts is enabled in the database #check if tts is enabled in the database
c.execute("SELECT tts FROM data WHERE guild_id = ?", (message.guild.id,)) c.execute("SELECT tts FROM data WHERE guild_id = ?", (message.guild.id,))