This commit is contained in:
Dragon Fire
2021-03-18 17:00:53 -04:00
parent c6e3c9c66e
commit 4f8330886b
+3 -3
View File
@@ -66,7 +66,7 @@ module.exports = class Player {
collector.on('collect', async msg => {
const existing = hand[Number.parseInt(msg.content, 10) - 1];
if (msg.content.toLowerCase() === 'swap') {
await reactIfAble(res, res.author, SUCCESS_EMOJI_ID, '✅');
await reactIfAble(msg, msg.author, SUCCESS_EMOJI_ID, '✅');
for (const card of this.hand) this.hand.delete(card);
this.dealHand();
hand = Array.from(this.hand);
@@ -75,12 +75,12 @@ module.exports = class Player {
await this.sendHand(hand, black);
return;
} else if (msg.content.toLowerCase() === 'gamble') {
await reactIfAble(res, res.author, SUCCESS_EMOJI_ID, '✅');
await reactIfAble(msg, msg.author, SUCCESS_EMOJI_ID, '✅');
this.points--;
gambled = true;
return;
} else if (existing) {
await reactIfAble(res, res.author, SUCCESS_EMOJI_ID, '✅');
await reactIfAble(msg, msg.author, SUCCESS_EMOJI_ID, '✅');
chosen.push(existing);
}
if (chosen.length >= black.pick * (gambled ? 2 : 1)) collector.stop();