From 8383b5611530c401253da45d8223ac50a486d880 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Sun, 16 Jan 2022 21:03:46 +0500 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/Administration/backup.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/Administration/backup.js b/commands/Administration/backup.js index 85fc2e6c..a17effab 100644 --- a/commands/Administration/backup.js +++ b/commands/Administration/backup.js @@ -30,6 +30,7 @@ class Backup extends Command { }); backup.create(message.guild).then((backup) => { m.delete(); + message.success("administration/backup:SUCCESS_PUBLIC"); message.author.send(message.translate("administration/backup:SUCCESS_PRIVATE", { backupID: backup.id @@ -61,6 +62,7 @@ class Backup extends Command { backup.load(backupID, message.guild).then(() => { backup.remove(backupID); message.author.send(message.translate("administration/backup:LOAD_SUCCESS")); + collector.stop(); }).catch((err) => { console.error(err); return message.error("misc:ERR_OCCURRED"); @@ -118,11 +120,10 @@ class Backup extends Command { collector.on("collect", async msg => { if (msg.content.toLowerCase() === message.translate("common:YES").toLowerCase()) { - message.author.send(message.translate("administration/backup:START_LOADING")); - backup.remove(backupID).then(async () => { message.success("administration/backup:SUCCESS_REMOVED"); }); + collector.stop(); } });