From 4b95418b54e808bfa28a847fb35a9d05aaa84067 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Fri, 5 Jan 2018 23:48:47 +0000 Subject: [PATCH] Rename B command, better balloon pop, change things out of other --- commands/games/balloon-pop.js | 8 ++++---- commands/{other => search}/spoopy-link.js | 2 +- commands/{other => text-edit}/shorten-url.js | 2 +- commands/text-edit/{b.js => 🅱.js} | 5 ++--- package.json | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) rename commands/{other => search}/spoopy-link.js (97%) rename commands/{other => text-edit}/shorten-url.js (97%) rename commands/text-edit/{b.js => 🅱.js} (90%) diff --git a/commands/games/balloon-pop.js b/commands/games/balloon-pop.js index 6fa29702..56a56fbf 100644 --- a/commands/games/balloon-pop.js +++ b/commands/games/balloon-pop.js @@ -1,5 +1,5 @@ const { Command } = require('discord.js-commando'); -const { verify } = require('../../util/Util'); +const { randomRange, verify } = require('../../util/Util'); module.exports = class BalloonPopCommand extends Command { constructor(client) { @@ -49,9 +49,9 @@ module.exports = class BalloonPopCommand extends Command { } if (pump) { await msg.say(`${user} pumps the balloon!`); - remains -= 50; - const popped = !Math.floor(Math.random() * (remains < 0 ? 2 : remains)); - if (popped) { + remains -= randomRange(25, 75); + const popped = Math.floor(Math.random() * remains); + if (popped < 0) { await msg.say('The balloon pops!'); winner = userTurn ? opponent : msg.author; } diff --git a/commands/other/spoopy-link.js b/commands/search/spoopy-link.js similarity index 97% rename from commands/other/spoopy-link.js rename to commands/search/spoopy-link.js index b820aad6..c492ff80 100644 --- a/commands/other/spoopy-link.js +++ b/commands/search/spoopy-link.js @@ -6,7 +6,7 @@ module.exports = class SpoopyLinkCommand extends Command { constructor(client) { super(client, { name: 'spoopy-link', - group: 'other', + group: 'search', memberName: 'spoopy-link', description: 'Determines if a link is spoopy or not.', args: [ diff --git a/commands/other/shorten-url.js b/commands/text-edit/shorten-url.js similarity index 97% rename from commands/other/shorten-url.js rename to commands/text-edit/shorten-url.js index ca1e61be..4edd204e 100644 --- a/commands/other/shorten-url.js +++ b/commands/text-edit/shorten-url.js @@ -7,7 +7,7 @@ module.exports = class ShortenURLCommand extends Command { super(client, { name: 'shorten-url', aliases: ['short-url', 'url-shorten'], - group: 'other', + group: 'text-edit', memberName: 'shorten-url', description: 'Creates a goo.gl short URL from another URL.', args: [ diff --git a/commands/text-edit/b.js b/commands/text-edit/🅱.js similarity index 90% rename from commands/text-edit/b.js rename to commands/text-edit/🅱.js index 47d51eb8..3c15d8f7 100644 --- a/commands/text-edit/b.js +++ b/commands/text-edit/🅱.js @@ -3,10 +3,9 @@ const { Command } = require('discord.js-commando'); module.exports = class BCommand extends Command { constructor(client) { super(client, { - name: 'b', - aliases: ['🅱'], + name: '🅱', group: 'text-edit', - memberName: 'b', + memberName: '🅱', description: 'Replaces b with 🅱.', args: [ { diff --git a/package.json b/package.json index 8afad663..2f9dfc08 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "60.3.0", + "version": "61.0.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {