From 1662608835099ee3176d07d67c6a3c69f716f938 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 30 Mar 2025 17:05:51 -0400 Subject: Fixed issues; Generate bot invite; Added database migrations --- bot/src/plugins/chatbot.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'bot/src/plugins') diff --git a/bot/src/plugins/chatbot.js b/bot/src/plugins/chatbot.js index efd2ff5..705f267 100644 --- a/bot/src/plugins/chatbot.js +++ b/bot/src/plugins/chatbot.js @@ -9,10 +9,9 @@ export async function ChatBot(msg, args) { if (!guildSetting.ollamaEnabled) return; if (!ollamaGlobal) return msg.reply('Sorry, the LLM chatbot feature has been turned off.'); + const loadingMessage = await msg.reply('Thinking...'); try { - const loadingMessage = await msg.reply('Thinking...'); - const response = await ollama.chat({ model: process.env.OLLAMA_MODEL, messages: [{ role: 'user', content: args }], @@ -29,6 +28,6 @@ export async function ChatBot(msg, args) { } catch (err) { console.error(err); - await msg.reply(`Something went wrong. [Submit an issue at the AleeBot repository.]()\nMessage:\n\`\`\`${err.stack}\`\`\``); + await loadingMessage.edit(`Something went wrong. [Submit an issue at the AleeBot repository.]()\nMessage:\n\`\`\`${err.stack}\`\`\``); } } -- cgit v1.2.3