mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-24 06:04:57 +05:00
make /reminds ephemeral
more time before losing a streak in /work
This commit is contained in:
parent
771bede60f
commit
2f3eabb3f3
2 changed files with 4 additions and 3 deletions
|
@ -35,7 +35,7 @@ class Work extends BaseCommand {
|
|||
time: `<t:${Math.floor(isInCooldown)}:R>`,
|
||||
});
|
||||
|
||||
if (Math.floor(Date.now() / 1000) > Math.floor(memberData.cooldowns.work + 24 * 60 * 60)) memberData.workStreak = 0;
|
||||
if (Math.floor(Date.now() / 1000) > Math.floor(memberData.cooldowns.work + 30 * 60 * 60)) memberData.workStreak = 0;
|
||||
|
||||
memberData.cooldowns.work = Math.floor(Date.now() / 1000) + 24 * 60 * 60; // 24 hours
|
||||
memberData.workStreak = (memberData.workStreak || 0) + 1;
|
||||
|
|
|
@ -15,7 +15,7 @@ class Reminds extends BaseCommand {
|
|||
uk: client.translate("general/reminds:DESCRIPTION", null, "uk-UA"),
|
||||
ru: client.translate("general/reminds:DESCRIPTION", null, "ru-RU"),
|
||||
})
|
||||
.setDMPermission(false),
|
||||
.setDMPermission(true),
|
||||
dirname: __dirname,
|
||||
ownerOnly: false,
|
||||
});
|
||||
|
@ -120,7 +120,7 @@ class Reminds extends BaseCommand {
|
|||
* @param {import("discord.js").ChatInputCommandInteraction} interaction
|
||||
*/
|
||||
async execute(client, interaction) {
|
||||
await interaction.deferReply();
|
||||
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 });
|
||||
|
@ -138,6 +138,7 @@ class Reminds extends BaseCommand {
|
|||
content: `${interaction.translate("common:PAGE")}: **1**/**${embeds.length}**`,
|
||||
embeds: [embeds[0]],
|
||||
components: [row],
|
||||
ephemeral: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue