Fix emoji emoji revolution

This commit is contained in:
Dragon Fire
2019-12-08 23:45:30 -05:00
parent 5076679b25
commit 6f155e82be
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -2,6 +2,7 @@ const Command = require('../../structures/Command');
const { stripIndents } = require('common-tags');
const { verify } = require('../../util/Util');
const emojis = ['⬆', '↗', '➡', '↘', '⬇', '↙', '⬅', '↖'];
const emojisNew = ['⬆️', '↗️', '➡️', '↘️', '⬇️', '↙️', '⬅️', '↖️'];
module.exports = class EmojiEmojiRevolutionCommand extends Command {
constructor(client) {
@@ -40,9 +41,10 @@ module.exports = class EmojiEmojiRevolutionCommand extends Command {
let oPts = 0;
while (turn < 10) {
++turn;
const emoji = emojis[Math.floor(Math.random() * emojis.length)];
const num = Math.floor(Math.random() * emojis.length);
const emoji = [emojis[num], emojisNew[num]];
await msg.say(emoji);
const filter = res => [msg.author.id, opponent.id].includes(res.author.id) && res.content === emoji;
const filter = res => [msg.author.id, opponent.id].includes(res.author.id) && emoji.includes(res.content);
const win = await msg.channel.awaitMessages(filter, {
max: 1,
time: 30000
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "109.2.0",
"version": "109.2.1",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {