Set ai random answers to normal if less than 2000 characters
This commit is contained in:
parent
a331d90b5b
commit
b63ee3a12a
1 changed files with 8 additions and 5 deletions
|
@ -53,11 +53,14 @@ async def ai_reply(message):
|
|||
if prompt == "" and message.embeds:
|
||||
prompt = message.embeds[0].description
|
||||
answer = aibot.answer(prompt)
|
||||
if len(answer) > 2000:
|
||||
embed = discord.Embed(
|
||||
description=answer,
|
||||
thumbnail="https://mistral.ai/images/favicon/favicon-32x32.png",
|
||||
)
|
||||
await message.reply(embed=embed)
|
||||
else:
|
||||
await message.reply(answer)
|
||||
|
||||
|
||||
async def react(message):
|
||||
|
|
Loading…
Reference in a new issue