From 658499b47eb2f25c3449ff83438d2cc9c78395e1 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Tue, 17 Oct 2023 08:33:41 +0500 Subject: [PATCH] fix remindme fr --- commands/General/remindme.js | 4 ++-- commands/Moderation/clearwarns.js | 2 +- commands/Moderation/warn.js | 2 +- commands/Tickets/createticketembed.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/commands/General/remindme.js b/commands/General/remindme.js index fd677f64..cd39e89a 100644 --- a/commands/General/remindme.js +++ b/commands/General/remindme.js @@ -73,13 +73,13 @@ class Remindme extends BaseCommand { data.userData.reminds.push(rData); data.userData.markModified("reminds"); - data.userData.save(); + await data.userData.save(); client.databaseCache.usersReminds.set(interaction.user.id, data.userData); interaction.success("general/remindme:SAVED", { message, - time: moment(rData.sendAt).locale(data.guildData.language).format("dddd, Do MMMM YYYY, HH:mm:ss"), + time: moment(rData.sendAt).locale(data.guildData.language || "en-US").format("dddd, Do MMMM YYYY, HH:mm:ss"), }, { edit: true }); } } diff --git a/commands/Moderation/clearwarns.js b/commands/Moderation/clearwarns.js index 6132216e..1e66b199 100644 --- a/commands/Moderation/clearwarns.js +++ b/commands/Moderation/clearwarns.js @@ -56,7 +56,7 @@ class Clearwarns extends BaseCommand { memberData.sanctions = []; memberData.markModified("sanctions"); - memberData.save(); + await memberData.save(); interaction.success("moderation/clearwarns:SUCCESS", { user: member.toString(), diff --git a/commands/Moderation/warn.js b/commands/Moderation/warn.js index 7f8dbd1d..0136e4e2 100644 --- a/commands/Moderation/warn.js +++ b/commands/Moderation/warn.js @@ -179,7 +179,7 @@ class Warn extends BaseCommand { memberData.sanctions.push(caseInfo); memberData.markModified("sanctions"); - memberData.save(); + await memberData.save(); if (data.guildData.plugins.modlogs) { const channel = interaction.guild.channels.cache.get(data.guildData.plugins.modlogs); diff --git a/commands/Tickets/createticketembed.js b/commands/Tickets/createticketembed.js index b735e06a..e0495fc8 100644 --- a/commands/Tickets/createticketembed.js +++ b/commands/Tickets/createticketembed.js @@ -46,7 +46,7 @@ class CreateTicketEmbed extends BaseCommand { guildData.plugins.tickets.count++; guildData.markModified("plugins.tickets"); - guildData.save(); + await guildData.save(); const channel = await interaction.guild.channels.create({ name: `${interaction.user.username}-support-${guildData.plugins.tickets.count}`,