diff --git a/commands/games/akinator.js b/commands/games/akinator.js index b38df7cb..ea76fd92 100644 --- a/commands/games/akinator.js +++ b/commands/games/akinator.js @@ -88,7 +88,7 @@ module.exports = class AkinatorCommand extends Command { async progress(channel, answer) { const session = this.sessions.get(channel.id); const { body } = await request - .get('http://192.99.38.142:8126/ws/answer') + .get('http://158.69.225.49:8152/ws/answer') .query({ session: session.id, signature: session.signature, @@ -111,7 +111,7 @@ module.exports = class AkinatorCommand extends Command { async guess(channel) { const session = this.sessions.get(channel.id); const { body } = await request - .get('http://192.99.38.142:8126/ws/list') + .get('http://158.69.225.49:8152/ws/list') .query({ session: session.id, signature: session.signature, diff --git a/commands/games/gunfight.js b/commands/games/gunfight.js index 2a1e39a2..9e64aaeb 100644 --- a/commands/games/gunfight.js +++ b/commands/games/gunfight.js @@ -1,5 +1,5 @@ const Command = require('../../structures/Command'); -const { wait, randomRange, verify } = require('../../util/Util'); +const { delay, randomRange, verify } = require('../../util/Util'); const words = ['fire', 'draw', 'shoot', 'bang', 'pull']; module.exports = class GunfightCommand extends Command { @@ -36,7 +36,7 @@ module.exports = class GunfightCommand extends Command { return msg.say('Looks like they declined...'); } await msg.say('Get Ready...'); - await wait(randomRange(1000, 30000)); + await delay(randomRange(1000, 30000)); const word = words[Math.floor(Math.random() * words.length)]; await msg.say(`TYPE \`${word.toUpperCase()}\` NOW!`); const filter = res => [opponent.id, msg.author.id].includes(res.author.id) && res.content.toLowerCase() === word; diff --git a/commands/image-edit/illegal.js b/commands/image-edit/illegal.js index 5d32d510..b8531941 100644 --- a/commands/image-edit/illegal.js +++ b/commands/image-edit/illegal.js @@ -1,6 +1,6 @@ const Command = require('../../structures/Command'); const request = require('node-superfetch'); -const { wait } = require('../../util/Util'); +const { delay } = require('../../util/Util'); module.exports = class IllegalCommand extends Command { constructor(client) { @@ -52,7 +52,7 @@ module.exports = class IllegalCommand extends Command { task: 'gif', word: text }); - await wait(5000); + await delay(5000); return body; } diff --git a/commands/single/tableflip.js b/commands/single/tableflip.js index 9b60471c..c0b9ddb2 100644 --- a/commands/single/tableflip.js +++ b/commands/single/tableflip.js @@ -1,5 +1,5 @@ const Command = require('../../structures/Command'); -const { wait } = require('../../util/Util'); +const { delay } = require('../../util/Util'); const frames = [ '(-°□°)- ┬─┬', '(╯°□°)╯ ]', @@ -22,7 +22,7 @@ module.exports = class TableflipCommand extends Command { async run(msg) { const message = await msg.say('(\\\\°□°)\\\\ ┬─┬'); for (const frame of frames) { - await wait(300); + await delay(200); await message.edit(frame); } return message; diff --git a/package.json b/package.json index 69666424..64d62e16 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "80.1.0", + "version": "80.1.1", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": { diff --git a/util/Util.js b/util/Util.js index 61a3f877..7ae83bd8 100644 --- a/util/Util.js +++ b/util/Util.js @@ -5,7 +5,7 @@ const yes = ['yes', 'y', 'ye', 'yeah', 'yup', 'yea']; const no = ['no', 'n', 'nah', 'nope']; class Util { - static wait(ms) { + static delay(ms) { return new Promise(resolve => setTimeout(resolve, ms)); }