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:
|
if prompt == "" and message.embeds:
|
||||||
prompt = message.embeds[0].description
|
prompt = message.embeds[0].description
|
||||||
answer = aibot.answer(prompt)
|
answer = aibot.answer(prompt)
|
||||||
embed = discord.Embed(
|
if len(answer) > 2000:
|
||||||
description=answer,
|
embed = discord.Embed(
|
||||||
thumbnail="https://mistral.ai/images/favicon/favicon-32x32.png",
|
description=answer,
|
||||||
)
|
thumbnail="https://mistral.ai/images/favicon/favicon-32x32.png",
|
||||||
await message.reply(embed=embed)
|
)
|
||||||
|
await message.reply(embed=embed)
|
||||||
|
else:
|
||||||
|
await message.reply(answer)
|
||||||
|
|
||||||
|
|
||||||
async def react(message):
|
async def react(message):
|
||||||
|
|
Loading…
Reference in a new issue