From 6af44be1d640b982dab986721ce73f7fca1ad0e8 Mon Sep 17 00:00:00 2001 From: eYuM-coder Date: Fri, 30 Aug 2024 17:30:13 -0600 Subject: [PATCH] Update --- src/slashCommands/fun/dmoptin.js | 3 +-- src/slashCommands/fun/dmoptout.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/slashCommands/fun/dmoptin.js b/src/slashCommands/fun/dmoptin.js index c640081..6e80ae4 100644 --- a/src/slashCommands/fun/dmoptin.js +++ b/src/slashCommands/fun/dmoptin.js @@ -9,7 +9,6 @@ module.exports = { .setDescription("Opts out of the DM command"), async execute(interaction) { try { - const client = interaction.client; const logging = await Logging.findOne({ guildId: interaction.guild.id }); const dmsystem = await dmSystem.findOne({ userId: interaction.author.id }); @@ -49,7 +48,7 @@ module.exports = { .catch(() => { interaction.channel.send({ content: "Error deleting message." }) }); } } catch (err) { - console.error(); + interaction.reply({ content: `This command cannot be used in Direct Messages.`, ephemeral: true }); } } }; \ No newline at end of file diff --git a/src/slashCommands/fun/dmoptout.js b/src/slashCommands/fun/dmoptout.js index 1543b7c..9b119cf 100644 --- a/src/slashCommands/fun/dmoptout.js +++ b/src/slashCommands/fun/dmoptout.js @@ -9,7 +9,6 @@ module.exports = { .setDescription("Opts out of the DM command"), async execute(interaction) { try { - const client = interaction.client; const logging = await Logging.findOne({ guildId: interaction.guild.id }); const dmsystem = await dmSystem.findOne({ userId: interaction.author.id }); @@ -49,7 +48,7 @@ module.exports = { .catch(() => { interaction.channel.send({ content: "Error deleting message." }) }); } } catch (err) { - console.error(); + interaction.reply({ content: `This command cannot be used in Direct Messages.`, ephemeral: true }); } } }; \ No newline at end of file