From 7dfdc7060c7eeea1b0bb14ed6854d26947ec541b Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Mon, 2 Dec 2019 22:38:40 -0500 Subject: [PATCH] Split Single and Multi Player Games --- README.md | 21 +++++++++++-------- Xiao.js | 3 ++- commands/{games => mp-games}/balloon-pop.js | 2 +- commands/{games => mp-games}/battle.js | 2 +- .../emoji-emoji-revolution.js | 2 +- commands/{games => mp-games}/gunfight.js | 2 +- commands/{games => mp-games}/quiz-duel.js | 2 +- .../{games => mp-games}/russian-roulette.js | 2 +- commands/{games => mp-games}/tic-tac-toe.js | 2 +- commands/{games => mp-games}/word-chain.js | 2 +- commands/{games => sp-games}/blackjack.js | 2 +- commands/{games => sp-games}/box-choosing.js | 2 +- commands/{games => sp-games}/captcha.js | 2 +- commands/{games => sp-games}/chance.js | 2 +- commands/{games => sp-games}/doors.js | 2 +- commands/{games => sp-games}/fishy.js | 2 +- commands/{games => sp-games}/google-feud.js | 2 +- commands/{games => sp-games}/hangman.js | 2 +- commands/{games => sp-games}/hunger-games.js | 2 +- commands/{games => sp-games}/lottery.js | 2 +- commands/{games => sp-games}/math-quiz.js | 2 +- commands/{games => sp-games}/quiz.js | 2 +- .../rock-paper-scissors.js | 2 +- commands/{games => sp-games}/roulette.js | 2 +- commands/{games => sp-games}/slots.js | 2 +- commands/{games => sp-games}/sorting-hat.js | 2 +- commands/{games => sp-games}/typing-test.js | 2 +- .../{games => sp-games}/whos-that-pokemon.js | 2 +- package.json | 4 ++-- 29 files changed, 42 insertions(+), 38 deletions(-) rename commands/{games => mp-games}/balloon-pop.js (99%) rename commands/{games => mp-games}/battle.js (99%) rename commands/{games => mp-games}/emoji-emoji-revolution.js (99%) rename commands/{games => mp-games}/gunfight.js (98%) rename commands/{games => mp-games}/quiz-duel.js (99%) rename commands/{games => mp-games}/russian-roulette.js (99%) rename commands/{games => mp-games}/tic-tac-toe.js (99%) rename commands/{games => mp-games}/word-chain.js (99%) rename commands/{games => sp-games}/blackjack.js (99%) rename commands/{games => sp-games}/box-choosing.js (99%) rename commands/{games => sp-games}/captcha.js (98%) rename commands/{games => sp-games}/chance.js (96%) rename commands/{games => sp-games}/doors.js (98%) rename commands/{games => sp-games}/fishy.js (97%) rename commands/{games => sp-games}/google-feud.js (99%) rename commands/{games => sp-games}/hangman.js (99%) rename commands/{games => sp-games}/hunger-games.js (99%) rename commands/{games => sp-games}/lottery.js (97%) rename commands/{games => sp-games}/math-quiz.js (98%) rename commands/{games => sp-games}/quiz.js (99%) rename commands/{games => sp-games}/rock-paper-scissors.js (98%) rename commands/{games => sp-games}/roulette.js (99%) rename commands/{games => sp-games}/slots.js (97%) rename commands/{games => sp-games}/sorting-hat.js (99%) rename commands/{games => sp-games}/typing-test.js (98%) rename commands/{games => sp-games}/whos-that-pokemon.js (99%) diff --git a/README.md b/README.md index f4bc2940..555541e4 100644 --- a/README.md +++ b/README.md @@ -254,33 +254,36 @@ Xiao is a Discord bot coded in JavaScript with * **what-anime:** Determines what anime a screenshot is from. * **zodiac-sign:** Responds with the Zodiac Sign for the given month/day. -### Games: +### Single-Player Games: -* **balloon-pop:** Don't let yourself be the last one to pump the balloon before it pops! -* **battle:** Engage in a turn-based battle against another user or the AI. * **blackjack:** Play a game of blackjack. * **box-choosing:** Do you believe that there are choices in life? Taken from Higurashi Chapter 4. * **captcha:** Try to guess what the captcha says. * **chance:** Attempt to win with a 1 in 1000 (or your choice) chance of winning. * **doors:** Open the right door, and you win the money! Make the wrong choice, and you get the fire! -* **emoji-emoji-revolution:** Can you type arrow emoji faster than anyone else has ever typed them before? * **fishy:** Go fishing. * **google-feud:** Attempt to determine the top suggestions for a Google search. -* **gunfight:** Engage in a western gunfight against another user. High noon. * **hangman:** Prevent a man from being hanged by guessing a word as fast as you can. * **hunger-games:** Simulate a Hunger Games match with up to 24 tributes. * **lottery:** Attempt to win the lottery with 6 numbers. * **math-quiz:** See how fast you can answer a math problem in a given time limit. -* **quiz-duel:** Answer a series of quiz questions against an opponent. * **quiz:** Answer a quiz question. * **rock-paper-scissors:** Play Rock-Paper-Scissors. * **roulette:** Play a game of roulette. -* **russian-roulette:** Who will pull the trigger and die first? * **slots:** Play a game of slots. * **sorting-hat:** Take a quiz to determine your Hogwarts house. -* **tic-tac-toe:** Play a game of tic-tac-toe with another user. * **typing-test:** See how fast you can type a sentence in a given time limit. -* **whos-that-pokemon:** Guess who that Pokémon is. +* **whos-that-pokemon:** Guess who that Pokémon is + +### Multi-Player Games + +* **balloon-pop:** Don't let yourself be the last one to pump the balloon before it pops! +* **battle:** Engage in a turn-based battle against another user or the AI. +* **emoji-emoji-revolution:** Can you type arrow emoji faster than anyone else has ever typed them before? +* **gunfight:** Engage in a western gunfight against another user. High noon. +* **quiz-duel:** Answer a series of quiz questions against an opponent. +* **russian-roulette:** Who will pull the trigger and die first? +* **tic-tac-toe:** Play a game of tic-tac-toe with another user. * **word-chain:** Try to come up with words that start with the last letter of your opponent's word. ### Image Manipulation: diff --git a/Xiao.js b/Xiao.js index 444bc5e4..5cbd1e75 100644 --- a/Xiao.js +++ b/Xiao.js @@ -23,7 +23,8 @@ client.registry ['events', 'Events'], ['search', 'Search'], ['analyze', 'Analyzers'], - ['games', 'Games'], + ['sp-games', 'Single-Player Games'], + ['mp-games', 'Multi-Player Games'], ['image-edit', 'Image Manipulation'], ['avatar-edit', 'Avatar Manipulation'], ['text-edit', 'Text Manipulation'], diff --git a/commands/games/balloon-pop.js b/commands/mp-games/balloon-pop.js similarity index 99% rename from commands/games/balloon-pop.js rename to commands/mp-games/balloon-pop.js index de1b6665..70f6edb6 100644 --- a/commands/games/balloon-pop.js +++ b/commands/mp-games/balloon-pop.js @@ -5,7 +5,7 @@ module.exports = class BalloonPopCommand extends Command { constructor(client) { super(client, { name: 'balloon-pop', - group: 'games', + group: 'mp-games', memberName: 'balloon-pop', description: 'Don\'t let yourself be the last one to pump the balloon before it pops!', credit: [ diff --git a/commands/games/battle.js b/commands/mp-games/battle.js similarity index 99% rename from commands/games/battle.js rename to commands/mp-games/battle.js index ee7ed23d..e3772665 100644 --- a/commands/games/battle.js +++ b/commands/mp-games/battle.js @@ -7,7 +7,7 @@ module.exports = class BattleCommand extends Command { super(client, { name: 'battle', aliases: ['fight', 'death-battle'], - group: 'games', + group: 'mp-games', memberName: 'battle', description: 'Engage in a turn-based battle against another user or the AI.', args: [ diff --git a/commands/games/emoji-emoji-revolution.js b/commands/mp-games/emoji-emoji-revolution.js similarity index 99% rename from commands/games/emoji-emoji-revolution.js rename to commands/mp-games/emoji-emoji-revolution.js index 867803d5..4ef7c9e9 100644 --- a/commands/games/emoji-emoji-revolution.js +++ b/commands/mp-games/emoji-emoji-revolution.js @@ -8,7 +8,7 @@ module.exports = class EmojiEmojiRevolutionCommand extends Command { super(client, { name: 'emoji-emoji-revolution', aliases: ['eer'], - group: 'games', + group: 'mp-games', memberName: 'emoji-emoji-revolution', description: 'Can you type arrow emoji faster than anyone else has ever typed them before?', guildOnly: true, diff --git a/commands/games/gunfight.js b/commands/mp-games/gunfight.js similarity index 98% rename from commands/games/gunfight.js rename to commands/mp-games/gunfight.js index 9860c456..48a31a2d 100644 --- a/commands/games/gunfight.js +++ b/commands/mp-games/gunfight.js @@ -7,7 +7,7 @@ module.exports = class GunfightCommand extends Command { super(client, { name: 'gunfight', aliases: ['western-gunfight'], - group: 'games', + group: 'mp-games', memberName: 'gunfight', description: 'Engage in a western gunfight against another user. High noon.', guildOnly: true, diff --git a/commands/games/quiz-duel.js b/commands/mp-games/quiz-duel.js similarity index 99% rename from commands/games/quiz-duel.js rename to commands/mp-games/quiz-duel.js index 09b6f653..d7c48097 100644 --- a/commands/games/quiz-duel.js +++ b/commands/mp-games/quiz-duel.js @@ -9,7 +9,7 @@ module.exports = class QuizDuelCommand extends Command { super(client, { name: 'quiz-duel', aliases: ['trivia-duel'], - group: 'games', + group: 'mp-games', memberName: 'quiz-duel', description: 'Answer a series of quiz questions against an opponent.', credit: [ diff --git a/commands/games/russian-roulette.js b/commands/mp-games/russian-roulette.js similarity index 99% rename from commands/games/russian-roulette.js rename to commands/mp-games/russian-roulette.js index 0f90925f..4b4c52f3 100644 --- a/commands/games/russian-roulette.js +++ b/commands/mp-games/russian-roulette.js @@ -7,7 +7,7 @@ module.exports = class RussianRouletteCommand extends Command { super(client, { name: 'russian-roulette', aliases: ['r-roulette', 'russia-gun'], - group: 'games', + group: 'mp-games', memberName: 'russian-roulette', description: 'Who will pull the trigger and die first?', args: [ diff --git a/commands/games/tic-tac-toe.js b/commands/mp-games/tic-tac-toe.js similarity index 99% rename from commands/games/tic-tac-toe.js rename to commands/mp-games/tic-tac-toe.js index 52cea465..c9ac51a5 100644 --- a/commands/games/tic-tac-toe.js +++ b/commands/mp-games/tic-tac-toe.js @@ -6,7 +6,7 @@ module.exports = class TicTacToeCommand extends Command { constructor(client) { super(client, { name: 'tic-tac-toe', - group: 'games', + group: 'mp-games', memberName: 'tic-tac-toe', description: 'Play a game of tic-tac-toe with another user.', guildOnly: true, diff --git a/commands/games/word-chain.js b/commands/mp-games/word-chain.js similarity index 99% rename from commands/games/word-chain.js rename to commands/mp-games/word-chain.js index b23644a8..8f5a3a27 100644 --- a/commands/games/word-chain.js +++ b/commands/mp-games/word-chain.js @@ -9,7 +9,7 @@ module.exports = class WordChainCommand extends Command { constructor(client) { super(client, { name: 'word-chain', - group: 'games', + group: 'mp-games', memberName: 'word-chain', description: 'Try to come up with words that start with the last letter of your opponent\'s word.', guildOnly: true, diff --git a/commands/games/blackjack.js b/commands/sp-games/blackjack.js similarity index 99% rename from commands/games/blackjack.js rename to commands/sp-games/blackjack.js index 8b602ed3..232cd128 100644 --- a/commands/games/blackjack.js +++ b/commands/sp-games/blackjack.js @@ -9,7 +9,7 @@ module.exports = class BlackjackCommand extends Command { super(client, { name: 'blackjack', aliases: ['twenty-one', '21', 'bj'], - group: 'games', + group: 'sp-games', memberName: 'blackjack', description: 'Play a game of blackjack.', args: [ diff --git a/commands/games/box-choosing.js b/commands/sp-games/box-choosing.js similarity index 99% rename from commands/games/box-choosing.js rename to commands/sp-games/box-choosing.js index 63029906..94d35ac0 100644 --- a/commands/games/box-choosing.js +++ b/commands/sp-games/box-choosing.js @@ -8,7 +8,7 @@ module.exports = class BoxChoosingCommand extends Command { super(client, { name: 'box-choosing', aliases: ['box-choose'], - group: 'games', + group: 'sp-games', memberName: 'box-choosing', description: 'Do you believe that there are choices in life? Taken from Higurashi Chapter 4.', credit: [ diff --git a/commands/games/captcha.js b/commands/sp-games/captcha.js similarity index 98% rename from commands/games/captcha.js rename to commands/sp-games/captcha.js index 6cb54510..3139b0c8 100644 --- a/commands/games/captcha.js +++ b/commands/sp-games/captcha.js @@ -9,7 +9,7 @@ module.exports = class CaptchaCommand extends Command { super(client, { name: 'captcha', aliases: ['captcha-quiz'], - group: 'games', + group: 'sp-games', memberName: 'captcha', description: 'Try to guess what the captcha says.', throttling: { diff --git a/commands/games/chance.js b/commands/sp-games/chance.js similarity index 96% rename from commands/games/chance.js rename to commands/sp-games/chance.js index bac5fb46..b44cffc2 100644 --- a/commands/games/chance.js +++ b/commands/sp-games/chance.js @@ -5,7 +5,7 @@ module.exports = class ChanceCommand extends Command { super(client, { name: 'chance', aliases: ['1-in', 'one-in'], - group: 'games', + group: 'sp-games', memberName: 'chance', description: 'Attempt to win with a 1 in 1000 (or your choice) chance of winning.', args: [ diff --git a/commands/games/doors.js b/commands/sp-games/doors.js similarity index 98% rename from commands/games/doors.js rename to commands/sp-games/doors.js index 8d6e07e0..42b83c14 100644 --- a/commands/games/doors.js +++ b/commands/sp-games/doors.js @@ -8,7 +8,7 @@ module.exports = class DoorsCommand extends Command { super(client, { name: 'doors', aliases: ['door', 'door-opening', 'open-door', 'monty-hall'], - group: 'games', + group: 'sp-games', memberName: 'doors', description: 'Open the right door, and you win the money! Make the wrong choice, and you get the fire!', args: [ diff --git a/commands/games/fishy.js b/commands/sp-games/fishy.js similarity index 97% rename from commands/games/fishy.js rename to commands/sp-games/fishy.js index 7e0c4d58..4637ab6a 100644 --- a/commands/games/fishy.js +++ b/commands/sp-games/fishy.js @@ -7,7 +7,7 @@ module.exports = class FishyCommand extends Command { super(client, { name: 'fishy', aliases: ['fishing'], - group: 'games', + group: 'sp-games', memberName: 'fishy', description: 'Go fishing.' }); diff --git a/commands/games/google-feud.js b/commands/sp-games/google-feud.js similarity index 99% rename from commands/games/google-feud.js rename to commands/sp-games/google-feud.js index e7ab7246..09cbfbd3 100644 --- a/commands/games/google-feud.js +++ b/commands/sp-games/google-feud.js @@ -7,7 +7,7 @@ module.exports = class GoogleFeudCommand extends Command { constructor(client) { super(client, { name: 'google-feud', - group: 'games', + group: 'sp-games', memberName: 'google-feud', description: 'Attempt to determine the top suggestions for a Google search.', credit: [ diff --git a/commands/games/hangman.js b/commands/sp-games/hangman.js similarity index 99% rename from commands/games/hangman.js rename to commands/sp-games/hangman.js index 1aad5cfc..2bd09d9e 100644 --- a/commands/games/hangman.js +++ b/commands/sp-games/hangman.js @@ -6,7 +6,7 @@ module.exports = class HangmanCommand extends Command { constructor(client) { super(client, { name: 'hangman', - group: 'games', + group: 'sp-games', memberName: 'hangman', description: 'Prevent a man from being hanged by guessing a word as fast as you can.', credit: [ diff --git a/commands/games/hunger-games.js b/commands/sp-games/hunger-games.js similarity index 99% rename from commands/games/hunger-games.js rename to commands/sp-games/hunger-games.js index 528cd8f4..88a53d4d 100644 --- a/commands/games/hunger-games.js +++ b/commands/sp-games/hunger-games.js @@ -8,7 +8,7 @@ module.exports = class HungerGamesCommand extends Command { super(client, { name: 'hunger-games', aliases: ['hunger-games-simulator', 'hunger-games-sim'], - group: 'games', + group: 'sp-games', memberName: 'hunger-games', description: 'Simulate a Hunger Games match with up to 24 tributes.', credit: [ diff --git a/commands/games/lottery.js b/commands/sp-games/lottery.js similarity index 97% rename from commands/games/lottery.js rename to commands/sp-games/lottery.js index 66fb156b..911464e5 100644 --- a/commands/games/lottery.js +++ b/commands/sp-games/lottery.js @@ -7,7 +7,7 @@ module.exports = class LotteryCommand extends Command { super(client, { name: 'lottery', aliases: ['lotto'], - group: 'games', + group: 'sp-games', memberName: 'lottery', description: 'Attempt to win the lottery with 6 numbers.', args: [ diff --git a/commands/games/math-quiz.js b/commands/sp-games/math-quiz.js similarity index 98% rename from commands/games/math-quiz.js rename to commands/sp-games/math-quiz.js index 5bfee81e..9d8a0ff5 100644 --- a/commands/games/math-quiz.js +++ b/commands/sp-games/math-quiz.js @@ -15,7 +15,7 @@ module.exports = class MathQuizCommand extends Command { constructor(client) { super(client, { name: 'math-quiz', - group: 'games', + group: 'sp-games', memberName: 'math-quiz', description: 'See how fast you can answer a math problem in a given time limit.', details: `**Difficulties:** ${difficulties.join(', ')}`, diff --git a/commands/games/quiz.js b/commands/sp-games/quiz.js similarity index 99% rename from commands/games/quiz.js rename to commands/sp-games/quiz.js index 95c1a85e..a609151d 100644 --- a/commands/games/quiz.js +++ b/commands/sp-games/quiz.js @@ -11,7 +11,7 @@ module.exports = class QuizCommand extends Command { super(client, { name: 'quiz', aliases: ['trivia'], - group: 'games', + group: 'sp-games', memberName: 'quiz', description: 'Answer a quiz question.', details: stripIndents` diff --git a/commands/games/rock-paper-scissors.js b/commands/sp-games/rock-paper-scissors.js similarity index 98% rename from commands/games/rock-paper-scissors.js rename to commands/sp-games/rock-paper-scissors.js index e34a3a49..953c0b40 100644 --- a/commands/games/rock-paper-scissors.js +++ b/commands/sp-games/rock-paper-scissors.js @@ -6,7 +6,7 @@ module.exports = class RockPaperScissorsCommand extends Command { super(client, { name: 'rock-paper-scissors', aliases: ['rps'], - group: 'games', + group: 'sp-games', memberName: 'rock-paper-scissors', description: 'Play Rock-Paper-Scissors.', args: [ diff --git a/commands/games/roulette.js b/commands/sp-games/roulette.js similarity index 99% rename from commands/games/roulette.js rename to commands/sp-games/roulette.js index fb25942d..5f56685c 100644 --- a/commands/games/roulette.js +++ b/commands/sp-games/roulette.js @@ -13,7 +13,7 @@ module.exports = class RouletteCommand extends Command { constructor(client) { super(client, { name: 'roulette', - group: 'games', + group: 'sp-games', memberName: 'roulette', description: 'Play a game of roulette.', args: [ diff --git a/commands/games/slots.js b/commands/sp-games/slots.js similarity index 97% rename from commands/games/slots.js rename to commands/sp-games/slots.js index dc8c24f0..dbb5878a 100644 --- a/commands/games/slots.js +++ b/commands/sp-games/slots.js @@ -6,7 +6,7 @@ module.exports = class SlotsCommand extends Command { constructor(client) { super(client, { name: 'slots', - group: 'games', + group: 'sp-games', memberName: 'slots', description: 'Play a game of slots.' }); diff --git a/commands/games/sorting-hat.js b/commands/sp-games/sorting-hat.js similarity index 99% rename from commands/games/sorting-hat.js rename to commands/sp-games/sorting-hat.js index d501e64f..91587ed2 100644 --- a/commands/games/sorting-hat.js +++ b/commands/sp-games/sorting-hat.js @@ -9,7 +9,7 @@ module.exports = class SortingHatCommand extends Command { super(client, { name: 'sorting-hat', aliases: ['sorting-hat-quiz', 'hogwarts', 'hogwarts-house'], - group: 'games', + group: 'sp-games', memberName: 'sorting-hat', description: 'Take a quiz to determine your Hogwarts house.', credit: [ diff --git a/commands/games/typing-test.js b/commands/sp-games/typing-test.js similarity index 98% rename from commands/games/typing-test.js rename to commands/sp-games/typing-test.js index a3598b8c..044f06b2 100644 --- a/commands/games/typing-test.js +++ b/commands/sp-games/typing-test.js @@ -15,7 +15,7 @@ module.exports = class TypingTestCommand extends Command { constructor(client) { super(client, { name: 'typing-test', - group: 'games', + group: 'sp-games', memberName: 'typing-test', description: 'See how fast you can type a sentence in a given time limit.', details: `**Difficulties:** ${difficulties.join(', ')}`, diff --git a/commands/games/whos-that-pokemon.js b/commands/sp-games/whos-that-pokemon.js similarity index 99% rename from commands/games/whos-that-pokemon.js rename to commands/sp-games/whos-that-pokemon.js index c739923a..bf987579 100644 --- a/commands/games/whos-that-pokemon.js +++ b/commands/sp-games/whos-that-pokemon.js @@ -8,7 +8,7 @@ module.exports = class WhosThatPokemonCommand extends Command { super(client, { name: 'whos-that-pokemon', aliases: ['who-pokemon', 'whos-that-pokémon', 'who-pokémon'], - group: 'games', + group: 'sp-games', memberName: 'whos-that-pokemon', description: 'Guess who that Pokémon is.', throttling: { diff --git a/package.json b/package.json index c5acff20..1b87f11e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "109.0.2", + "version": "109.0.3", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": { @@ -52,7 +52,7 @@ "devDependencies": { "eslint": "^5.16.0", "eslint-config-amber": "^2.0.0", - "eslint-plugin-json": "^1.4.0" + "eslint-plugin-json": "^2.0.1" }, "eslintConfig": { "extends": "amber",