diff options
| author | Andrew Lee <andrew@alee14.me> | 2025-03-30 17:05:51 -0400 |
|---|---|---|
| committer | Andrew Lee <andrew@alee14.me> | 2025-03-30 17:07:09 -0400 |
| commit | 1662608835099ee3176d07d67c6a3c69f716f938 (patch) | |
| tree | 6a891bdc439c32e0c10369d91e55c9b4e444c65f /bot/src/plugins | |
| parent | 3c61c156137984cf61d3517d4d9633ca6de072f6 (diff) | |
| download | AleeBot-1662608835099ee3176d07d67c6a3c69f716f938.tar.gz AleeBot-1662608835099ee3176d07d67c6a3c69f716f938.tar.bz2 AleeBot-1662608835099ee3176d07d67c6a3c69f716f938.zip | |
Fixed issues; Generate bot invite; Added database migrations
Diffstat (limited to 'bot/src/plugins')
| -rw-r--r-- | bot/src/plugins/chatbot.js | 5 |
1 files changed, 2 insertions, 3 deletions
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.](<https://github.com/Alee14/AleeBot/issues>)\nMessage:\n\`\`\`${err.stack}\`\`\``); + await loadingMessage.edit(`Something went wrong. [Submit an issue at the AleeBot repository.](<https://github.com/Alee14/AleeBot/issues>)\nMessage:\n\`\`\`${err.stack}\`\`\``); } } |
