From 39abc2bb369b6ebdf063e44b981c0a926153a948 Mon Sep 17 00:00:00 2001 From: WubzyGD Date: Mon, 31 Jan 2022 16:43:36 -0700 Subject: [PATCH] buggies --- commands/anime/char.js | 2 +- util/oncommand.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/commands/anime/char.js b/commands/anime/char.js index f7d6c48..1d196fd 100644 --- a/commands/anime/char.js +++ b/commands/anime/char.js @@ -383,7 +383,7 @@ module.exports = { if (tr.queued !== true) {return message.reply("That character was already accepted, so you can't accept it again...");} tr.queued = false; return await tr.save() - .then(() => { + .then(async () => { client.misc.cache.chars.set(tr.name.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), tr.id); tr.nicknames.forEach(nn => client.misc.cache.chars.set(nn.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), tr.id)); client.misc.cache.charsID.set(tr.id, tr.name.normalize("NFD").replace(/[\u0300-\u036f]/g, "")); diff --git a/util/oncommand.js b/util/oncommand.js index eac8d38..955b724 100644 --- a/util/oncommand.js +++ b/util/oncommand.js @@ -9,7 +9,6 @@ module.exports = async (message, msg, args, cmd, prefix, mention, client) => { ? await UserData.findOne({uid: message.author.id}) : new UserData({uid: message.author.id}); tu.commands = tu.commands + 1; - tu.save(); if (tu.commands > 50 && !tu.msg) { message.author.send({embeds: [new Discord.MessageEmbed() @@ -18,8 +17,10 @@ module.exports = async (message, msg, args, cmd, prefix, mention, client) => { .addField("What next?", "If you're enjoying what I do, you can [join my support server](https://discord.gg/u9c2uD24wB) to leave feedback and say hi to my developers. You can also consider [giving the repository a star](https://github.com/NatsukiDev/Natsuki) to show your support! I look forward to my time with you in the future <:hearty:812130944319750144>") .setFooter({text: "Natsuki"}) .setTimestamp() + .setColor('c375f0') ]}).catch(() => {}); tu.msg = true; - tu.save(); } + + tu.save(); }; \ No newline at end of file