mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-24 06:04:57 +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"),
|
ru: client.translate("common:MESSAGE", null, "ru-RU"),
|
||||||
})
|
})
|
||||||
.setRequired(true),
|
.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,
|
dirname: __dirname,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
|
@ -58,7 +49,7 @@ class Remindme extends BaseCommand {
|
||||||
* @param {import("discord.js").ChatInputCommandInteraction} interaction
|
* @param {import("discord.js").ChatInputCommandInteraction} interaction
|
||||||
*/
|
*/
|
||||||
async execute(client, 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"],
|
const conditions = ["s", "m", "h", "d", "w", "y"],
|
||||||
time = interaction.options.getString("time"),
|
time = interaction.options.getString("time"),
|
||||||
|
|
|
@ -16,16 +16,7 @@ class Reminds extends BaseCommand {
|
||||||
ru: client.translate("general/reminds:DESCRIPTION", null, "ru-RU"),
|
ru: client.translate("general/reminds:DESCRIPTION", null, "ru-RU"),
|
||||||
})
|
})
|
||||||
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall])
|
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall])
|
||||||
.setContexts([InteractionContextType.BotDM, InteractionContextType.PrivateChannel, InteractionContextType.Guild])
|
.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"),
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
dirname: __dirname,
|
dirname: __dirname,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
});
|
});
|
||||||
|
@ -92,6 +83,7 @@ class Reminds extends BaseCommand {
|
||||||
length: embeds.length,
|
length: embeds.length,
|
||||||
}),
|
}),
|
||||||
fetchReply: true,
|
fetchReply: true,
|
||||||
|
ephemeral: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
const filter = res => {
|
const filter = res => {
|
||||||
|
@ -170,7 +162,7 @@ class Reminds extends BaseCommand {
|
||||||
* @param {import("discord.js").ChatInputCommandInteraction} interaction
|
* @param {import("discord.js").ChatInputCommandInteraction} interaction
|
||||||
*/
|
*/
|
||||||
async execute(client, 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;
|
const reminds = interaction.data.user.reminds;
|
||||||
if (reminds.length === 0) return interaction.error("general/reminds:NO_REMINDS", null, { edit: true });
|
if (reminds.length === 0) return interaction.error("general/reminds:NO_REMINDS", null, { edit: true });
|
||||||
|
|
Loading…
Reference in a new issue