This commit is contained in:
JonnyBro 2022-01-04 01:22:45 +05:00
parent 4773ecfe1f
commit aa5249c78b

View file

@ -107,7 +107,7 @@ class Backup extends Command {
if (!backupID) return message.error("administration/backup:MISSING_BACKUP_ID"); if (!backupID) return message.error("administration/backup:MISSING_BACKUP_ID");
backup.fetch(backupID).then(async () => { backup.fetch(backupID).then(async () => {
message.sendT("administration/backup:CONFIRMATION"); message.sendT("administration/backup:REMOVE_CONFIRMATION");
await message.channel.awaitMessages(m => (m.author.id === message.author.id) && (m.content === "confirm"), { await message.channel.awaitMessages(m => (m.author.id === message.author.id) && (m.content === "confirm"), {
max: 1, max: 1,
time: 20000, time: 20000,
@ -117,8 +117,9 @@ class Backup extends Command {
return message.error("administration/backup:TIMES_UP"); return message.error("administration/backup:TIMES_UP");
}); });
backup.remove(backupID); backup.remove(backupID).then(async () => {
message.success("administration/backup:SUCCESS_REMOVED"); message.success("administration/backup:SUCCESS_REMOVED");
});
}).catch(() => { }).catch(() => {
// if the backup wasn't found // if the backup wasn't found
return message.error("administration/backup:NO_BACKUP_FOUND", { return message.error("administration/backup:NO_BACKUP_FOUND", {