diff --git a/public_bot.js b/public_bot.js index 7dfc27f..4cc8de1 100644 --- a/public_bot.js +++ b/public_bot.js @@ -69,7 +69,7 @@ async function handleApiCall(apiCall, userId, interaction) { function handleResponse(response, interaction, ephemeral = false) { if (response.success && typeof response === 'object' && Object.keys(response).length > 1) { // Extract the message if it exists, otherwise use a default description - const description = response.message ? response.message : ''; + const description = response.message ? response.message : 'Success!'; // If there is a 'stats' field, handle it separately to format it correctly if (response.stats) { @@ -157,7 +157,7 @@ function handleResponse(response, interaction, ephemeral = false) { // Slash command definitions const commands = [ - new SlashCommandBuilder().setName('server-time').setDescription('Get the server time'), +// new SlashCommandBuilder().setName('api-key-time').setDescription('Get the server time'), new SlashCommandBuilder().setName('server-stats').setDescription('Get the server statistics'), new SlashCommandBuilder().setName('server-log').setDescription('Get the server log'), new SlashCommandBuilder().setName('start-server').setDescription('Start the Minecraft server'), @@ -221,10 +221,10 @@ client.on('interactionCreate', async interaction => { const MyMC = new MyMCLib(apiToken); switch (interaction.commandName) { - case 'server-time': - const timeData = await handleApiCall(() => MyMC.getTime(), userId, interaction); - handleResponse(timeData, interaction); - break; + // case 'server-time': + // const timeData = await handleApiCall(() => MyMC.getTime(), userId, interaction); + // handleResponse(timeData, interaction); + // break; case 'server-stats': const stats = await handleApiCall(() => MyMC.getStats(), userId, interaction);