Don't remove !edit command if it fails

cshd
Dragory 2020-10-21 21:29:20 +03:00
parent 4ecea31fd8
commit 0a98b5cb49
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
2 changed files with 3 additions and 2 deletions

View File

@ -755,6 +755,7 @@ class Thread {
} }
await this._updateThreadMessage(threadMessage.id, { body: newText }); await this._updateThreadMessage(threadMessage.id, { body: newText });
return true;
} }
/** /**

View File

@ -44,8 +44,8 @@ module.exports = ({ bot, knex, config, commands }) => {
return; return;
} }
await thread.editStaffReply(msg.member, threadMessage, args.text); const edited = await thread.editStaffReply(msg.member, threadMessage, args.text);
msg.delete().catch(utils.noop); if (edited) msg.delete().catch(utils.noop);
}, { }, {
aliases: ["e"] aliases: ["e"]
}); });