From 786aa9112b27a9619295885cf68eebca6a5a9203 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Sun, 10 Nov 2024 17:28:24 +0500 Subject: [PATCH] make reminds always ephemeral --- commands/General/remindme.js | 11 +---------- commands/General/reminds.js | 14 +++----------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/commands/General/remindme.js b/commands/General/remindme.js index 3a784667..30fb4455 100644 --- a/commands/General/remindme.js +++ b/commands/General/remindme.js @@ -37,15 +37,6 @@ class Remindme extends BaseCommand { ru: client.translate("common:MESSAGE", null, "ru-RU"), }) .setRequired(true), - ) - .addBooleanOption(option => - option - .setName("ephemeral") - .setDescription(client.translate("misc:EPHEMERAL_RESPONSE")) - .setDescriptionLocalizations({ - uk: client.translate("misc:EPHEMERAL_RESPONSE", null, "uk-UA"), - ru: client.translate("misc:EPHEMERAL_RESPONSE", null, "ru-RU"), - }), ), dirname: __dirname, ownerOnly: false, @@ -58,7 +49,7 @@ class Remindme extends BaseCommand { * @param {import("discord.js").ChatInputCommandInteraction} interaction */ async execute(client, interaction) { - await interaction.deferReply({ ephemeral: interaction.options.getBoolean("ephemeral") || false }); + await interaction.deferReply({ ephemeral: true }); const conditions = ["s", "m", "h", "d", "w", "y"], time = interaction.options.getString("time"), diff --git a/commands/General/reminds.js b/commands/General/reminds.js index c0564893..32f703a9 100644 --- a/commands/General/reminds.js +++ b/commands/General/reminds.js @@ -16,16 +16,7 @@ class Reminds extends BaseCommand { ru: client.translate("general/reminds:DESCRIPTION", null, "ru-RU"), }) .setIntegrationTypes([ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall]) - .setContexts([InteractionContextType.BotDM, InteractionContextType.PrivateChannel, InteractionContextType.Guild]) - .addBooleanOption(option => - option - .setName("ephemeral") - .setDescription(client.translate("misc:EPHEMERAL_RESPONSE")) - .setDescriptionLocalizations({ - uk: client.translate("misc:EPHEMERAL_RESPONSE", null, "uk-UA"), - ru: client.translate("misc:EPHEMERAL_RESPONSE", null, "ru-RU"), - }), - ), + .setContexts([InteractionContextType.BotDM, InteractionContextType.PrivateChannel, InteractionContextType.Guild]), dirname: __dirname, ownerOnly: false, }); @@ -92,6 +83,7 @@ class Reminds extends BaseCommand { length: embeds.length, }), fetchReply: true, + ephemeral: true, }); const filter = res => { @@ -170,7 +162,7 @@ class Reminds extends BaseCommand { * @param {import("discord.js").ChatInputCommandInteraction} interaction */ async execute(client, interaction) { - await interaction.deferReply({ ephemeral: interaction.options.getBoolean("ephemeral") || false }); + await interaction.deferReply({ ephemeral: true }); const reminds = interaction.data.user.reminds; if (reminds.length === 0) return interaction.error("general/reminds:NO_REMINDS", null, { edit: true });