update mistral-chat command

This commit is contained in:
2026-01-28 18:02:57 +03:00
parent 12d9591109
commit 371e53ab14
+8 -1
View File
@@ -64,9 +64,16 @@ export class MistralChat extends ChatCommand {
const startTime = Date.now(); const startTime = Date.now();
try { try {
const imagesCount = chatMessages.reduce((total, curr) => {
return total + (curr.content.filter(c => c.type === "image_url")?.length ?? 0);
}, 0);
waitMessage = await bot.sendMessage({ waitMessage = await bot.sendMessage({
chat_id: chatId, chat_id: chatId,
text: Environment.waitText, text: imagesCount ?
imagesCount > 1 ? Environment.analyzingPicturesText : Environment.analyzingPictureText
: Environment.waitText,
reply_parameters: { reply_parameters: {
chat_id: chatId, chat_id: chatId,
message_id: msg.message_id message_id: msg.message_id