Add loading for LLM command too

This commit is contained in:
Marcin Czop 2024-11-19 22:55:39 +01:00
parent 029511e195
commit b94fa6ba0b
No known key found for this signature in database
GPG key ID: 44BCC84471234D0D

View file

@ -3,6 +3,7 @@ import { EmbedBuilder } from "discord.js";
import { RunFunction } from "../../interfaces/commands";
export const run: RunFunction = async (client, message, args) => {
const loadingMessage = await message.reply("<a:loading_blocks:1308549135951073340>");
const prompt = args.join(" ");
if (!prompt) {
message.channel.send("Podaj tekst do przetworzenia.");
@ -34,7 +35,7 @@ export const run: RunFunction = async (client, message, args) => {
iconURL: message.author.displayAvatarURL(),
});
message.channel.send({ embeds: [embed] });
loadingMessage.edit({ embeds: [embed], content: "" });
};
export const name = "llm";