From bcb17284cb284888c8364583d32a3faee3145a1a Mon Sep 17 00:00:00 2001 From: Raven Date: Sat, 3 Aug 2024 21:15:00 -0400 Subject: [PATCH] repair !r --- bot/discord-bot.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/bot/discord-bot.js b/bot/discord-bot.js index 5a617e9..5f4cdd8 100644 --- a/bot/discord-bot.js +++ b/bot/discord-bot.js @@ -39,7 +39,7 @@ const {Client, GatewayIntentBits, EmbedBuilder} = require('discord.js'); let additionalContent = ''; if (content === '!r' || content === '!reset') { - + await resetConversation(message) // Handle conversation reset return await sendRand(userResetMessages) } @@ -105,27 +105,16 @@ const {Client, GatewayIntentBits, EmbedBuilder} = require('discord.js'); } ); console.log(response.status) - if (response.status === 200) { - return await sendRand(userResetMessages); - - } else { - message.reply('Error clearing message history.'); - } } catch (error) { - message.reply('Error clearing message history.'); + console.log(error) } } async function restartCore(message) { try { const response = await axios.post(`${process.env.API_PATH}/restart-core`); - if (response.status === 200) { - message.reply('The core server was restarted.'); - } else { - message.reply('Error restarting the core.'); - } } catch (error) { - message.reply('Error restarting the core.'); + console.log(error) } }