repair !r
This commit is contained in:
parent
359ee73fb3
commit
bcb17284cb
@ -39,7 +39,7 @@ const {Client, GatewayIntentBits, EmbedBuilder} = require('discord.js');
|
|||||||
let additionalContent = '';
|
let additionalContent = '';
|
||||||
|
|
||||||
if (content === '!r' || content === '!reset') {
|
if (content === '!r' || content === '!reset') {
|
||||||
|
await resetConversation(message)
|
||||||
// Handle conversation reset
|
// Handle conversation reset
|
||||||
return await sendRand(userResetMessages)
|
return await sendRand(userResetMessages)
|
||||||
}
|
}
|
||||||
@ -105,27 +105,16 @@ const {Client, GatewayIntentBits, EmbedBuilder} = require('discord.js');
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
console.log(response.status)
|
console.log(response.status)
|
||||||
if (response.status === 200) {
|
|
||||||
return await sendRand(userResetMessages);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
message.reply('Error clearing message history.');
|
|
||||||
}
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
message.reply('Error clearing message history.');
|
console.log(error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function restartCore(message) {
|
async function restartCore(message) {
|
||||||
try {
|
try {
|
||||||
const response = await axios.post(`${process.env.API_PATH}/restart-core`);
|
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) {
|
} catch (error) {
|
||||||
message.reply('Error restarting the core.');
|
console.log(error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user