From 2b1f5e4d076a4b431a39057db45c2a5047676e70 Mon Sep 17 00:00:00 2001 From: Supositware Date: Tue, 30 Aug 2022 04:06:15 +0200 Subject: [PATCH] Made messages ephemeral and fixed the category --- commands/admin/autoresponse.js | 10 +++++----- commands/admin/quotation.js | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/commands/admin/autoresponse.js b/commands/admin/autoresponse.js index 942c2e29..97f79135 100644 --- a/commands/admin/autoresponse.js +++ b/commands/admin/autoresponse.js @@ -5,7 +5,7 @@ export default { data: new SlashCommandBuilder() .setName('autoresponse') .setDescription('Enable or disable autoresponse'), - category: 'utility', + category: 'admin', userPermissions: [PermissionFlagsBits.ManageMessages], async execute(interaction, args, client) { const autoresponseStat = await db.autoresponseStat.findOne({ where: { serverID: interaction.guild.id } }); @@ -13,7 +13,7 @@ export default { if (autoresponseStat.stat !== 'enable') { const body = { serverID: interaction.guild.id, stat: 'enable' }; await db.autoresponseStat.create(body); - return await interaction.reply({ content: 'Autoresponse has been enabled.' }); + return await interaction.reply({ content: 'Autoresponse has been enabled.', ephemeral: true }); } const row = new ActionRowBuilder() @@ -30,7 +30,7 @@ export default { .setStyle(ButtonStyle.Danger), ); - await interaction.reply({ content: 'Autoresponse is already enabled, do you wish to disable it?', components: [row] }); + await interaction.reply({ content: 'Autoresponse is already enabled, do you wish to disable it?', components: [row], ephemeral: true }); client.once('interactionCreate', async (interactionMenu) => { if (!interactionMenu.isButton) return; @@ -38,10 +38,10 @@ export default { if (interactionMenu.customId === 'yes') { const body = { serverID: interaction.guild.id, stat: 'disable' }; await db.autoresponseStat.update(body, { where: { serverID: interaction.guild.id } }); - return interaction.editReply('Auto response has been disabled.'); + return interaction.editReply({ content: 'Auto response has been disabled.', ephemeral: true }); } else { - return interaction.editReply('Nothing has been changed.'); + return interaction.editReply({ content: 'Nothing has been changed.', ephemeral: true }); } }); }, diff --git a/commands/admin/quotation.js b/commands/admin/quotation.js index 89426acd..bcc4a41a 100644 --- a/commands/admin/quotation.js +++ b/commands/admin/quotation.js @@ -5,7 +5,7 @@ export default { data: new SlashCommandBuilder() .setName('quotation') .setDescription('Enable or disable quotations'), - category: 'utility', + category: 'admin', userPermissions: [PermissionFlagsBits.ManageMessages], async execute(interaction, args, client) { const quotationstat = await db.quotationstat.findOne({ where: { serverID: interaction.guild.id } }); @@ -13,7 +13,7 @@ export default { if (quotationstat.stat !== 'enable') { const body = { serverID: interaction.guild.id, stat: 'enable' }; await db.quotationstat.create(body); - return await interaction.reply({ content: 'Quotation has been enabled.' }); + return await interaction.reply({ content: 'Quotation has been enabled.', ephemeral: true }); } const row = new ActionRowBuilder() @@ -30,7 +30,7 @@ export default { .setStyle(ButtonStyle.Danger), ); - await interaction.reply({ content: 'Quotation is already enabled, do you wish to disable it?', components: [row] }); + await interaction.reply({ content: 'Quotation is already enabled, do you wish to disable it?', components: [row], ephemeral: true }); client.once('interactionCreate', async (interactionMenu) => { if (!interactionMenu.isButton) return; @@ -38,10 +38,10 @@ export default { if (interactionMenu.customId === 'yes') { const body = { serverID: interaction.guild.id, stat: 'disable' }; await db.quotationstat.update(body, { where: { serverID: interaction.guild.id } }); - return interaction.editReply('Quotation has been disabled.'); + return interaction.editReply({ content: 'Quotation has been disabled.', ephemeral: true }); } else { - return interaction.editReply('Nothing has been changed.'); + return interaction.editReply({ content: 'Nothing has been changed.', ephemeral: true }); } }); },