From 2f3eabb3f302f81cf0003dbeb146c26038d5c969 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Tue, 28 May 2024 18:15:14 +0500 Subject: [PATCH] make /reminds ephemeral more time before losing a streak in /work --- commands/Economy/work.js | 2 +- commands/General/reminds.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/commands/Economy/work.js b/commands/Economy/work.js index 82f53482..d45491ae 100644 --- a/commands/Economy/work.js +++ b/commands/Economy/work.js @@ -35,7 +35,7 @@ class Work extends BaseCommand { time: ``, }); - 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; diff --git a/commands/General/reminds.js b/commands/General/reminds.js index 49dd7875..ea248eb6 100644 --- a/commands/General/reminds.js +++ b/commands/General/reminds.js @@ -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, }); } }