mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 13:14:58 +05:00
фикс
This commit is contained in:
parent
221daac4a4
commit
8383b56115
1 changed files with 3 additions and 2 deletions
|
@ -30,6 +30,7 @@ class Backup extends Command {
|
||||||
});
|
});
|
||||||
backup.create(message.guild).then((backup) => {
|
backup.create(message.guild).then((backup) => {
|
||||||
m.delete();
|
m.delete();
|
||||||
|
|
||||||
message.success("administration/backup:SUCCESS_PUBLIC");
|
message.success("administration/backup:SUCCESS_PUBLIC");
|
||||||
message.author.send(message.translate("administration/backup:SUCCESS_PRIVATE", {
|
message.author.send(message.translate("administration/backup:SUCCESS_PRIVATE", {
|
||||||
backupID: backup.id
|
backupID: backup.id
|
||||||
|
@ -61,6 +62,7 @@ class Backup extends Command {
|
||||||
backup.load(backupID, message.guild).then(() => {
|
backup.load(backupID, message.guild).then(() => {
|
||||||
backup.remove(backupID);
|
backup.remove(backupID);
|
||||||
message.author.send(message.translate("administration/backup:LOAD_SUCCESS"));
|
message.author.send(message.translate("administration/backup:LOAD_SUCCESS"));
|
||||||
|
collector.stop();
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return message.error("misc:ERR_OCCURRED");
|
return message.error("misc:ERR_OCCURRED");
|
||||||
|
@ -118,11 +120,10 @@ class Backup extends Command {
|
||||||
|
|
||||||
collector.on("collect", async msg => {
|
collector.on("collect", async msg => {
|
||||||
if (msg.content.toLowerCase() === message.translate("common:YES").toLowerCase()) {
|
if (msg.content.toLowerCase() === message.translate("common:YES").toLowerCase()) {
|
||||||
message.author.send(message.translate("administration/backup:START_LOADING"));
|
|
||||||
|
|
||||||
backup.remove(backupID).then(async () => {
|
backup.remove(backupID).then(async () => {
|
||||||
message.success("administration/backup:SUCCESS_REMOVED");
|
message.success("administration/backup:SUCCESS_REMOVED");
|
||||||
});
|
});
|
||||||
|
collector.stop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue