mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-23 21:54:58 +05:00
make reminds always ephemeral
This commit is contained in:
parent
f7057160a0
commit
786aa9112b
2 changed files with 4 additions and 21 deletions
|
@ -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"),
|
||||
|
|
|
@ -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 });
|
||||
|
|
Loading…
Reference in a new issue