mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 21:44:48 +02:00
Fix emoji emoji revolution
This commit is contained in:
@@ -2,6 +2,7 @@ const Command = require('../../structures/Command');
|
|||||||
const { stripIndents } = require('common-tags');
|
const { stripIndents } = require('common-tags');
|
||||||
const { verify } = require('../../util/Util');
|
const { verify } = require('../../util/Util');
|
||||||
const emojis = ['⬆', '↗', '➡', '↘', '⬇', '↙', '⬅', '↖'];
|
const emojis = ['⬆', '↗', '➡', '↘', '⬇', '↙', '⬅', '↖'];
|
||||||
|
const emojisNew = ['⬆️', '↗️', '➡️', '↘️', '⬇️', '↙️', '⬅️', '↖️'];
|
||||||
|
|
||||||
module.exports = class EmojiEmojiRevolutionCommand extends Command {
|
module.exports = class EmojiEmojiRevolutionCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -40,9 +41,10 @@ module.exports = class EmojiEmojiRevolutionCommand extends Command {
|
|||||||
let oPts = 0;
|
let oPts = 0;
|
||||||
while (turn < 10) {
|
while (turn < 10) {
|
||||||
++turn;
|
++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);
|
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, {
|
const win = await msg.channel.awaitMessages(filter, {
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 30000
|
time: 30000
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "109.2.0",
|
"version": "109.2.1",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user