Convert all react methods to reactIfAble

This commit is contained in:
Dragon Fire
2020-11-26 11:44:51 -05:00
parent cd166dce0e
commit c31fd9151e
10 changed files with 23 additions and 20 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
const Command = require('../../structures/Command');
const { stripIndents, oneLine } = require('common-tags');
const Collection = require('@discordjs/collection');
const { delay, awaitPlayers, list } = require('../../util/Util');
const { delay, awaitPlayers, list, reactIfAble } = require('../../util/Util');
const words = require('../../assets/json/imposter');
const { SUCCESS_EMOJI_ID } = process.env;
@@ -114,7 +114,7 @@ module.exports = class ImposterCommand extends Command {
votes: currentVotes ? currentVotes + 1 : 1,
id: ids[int - 1]
});
res.react(SUCCESS_EMOJI_ID || '✅').catch(() => null);
reactIfAble(res, res.author, SUCCESS_EMOJI_ID, '✅');
return true;
}
return false;