diff --git a/README.md b/README.md index 9edbb389..7f16a966 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,6 @@ information and support. * **fidget**: Responds with a random image of Fidget. * **fortune**: Responds with a random fortune. * **joke**: Responds with a random joke. -* **karen**: Responds with a random image of Karen. * **kiss-marry-kill**: Determines who to kiss, who to marry, and who to kill. * **magic-conch**: Asks your question to the Magic Conch. * **name**: Responds with a random name, with the gender of your choice. @@ -82,13 +81,14 @@ information and support. * **pikachu**: Responds with a random image of Pikachu. * **quantum-coin**: Flips a coin that lands on some form of nothing. * **quote**: Responds with a random quote. -* **rate-waifu**: Rates a waifu. +* **rate**: Rates something. * **reddit**: Responds with a random post from a subreddit. * **roast**: Roasts a user. * **roll**: Rolls a dice with a maximum value of your choice. * **security-key**: Responds with a random security key. * **shower-thought**: Responds with a random shower thought, directly from r/Showerthoughts. * **user-roulette**: Randomly chooses a member of the server. +* **waifu**: Responds with a random image of one of dragonfire535's waifu. * **would-you-rather**: Responds with a random "Would you rather ...?" question. * **xiao**: Responds with a random image of Xiao Pai. diff --git a/assets/json/waifu.json b/assets/json/waifu.json new file mode 100644 index 00000000..c0628cb0 --- /dev/null +++ b/assets/json/waifu.json @@ -0,0 +1,14 @@ +{ + "Karen Kujou": "3oLAP", + "Kotori Habane": "1d9brai", + "Rune": "CxoVShV", + "Aqua": "p98ik3Q", + "Kirino Kousaka": "0gCVjxe", + "Koneko Toujou": "qdnensl", + "Megumin": "RduvUsk", + "Hatsune Miku": "4Z9cydo", + "Kagamine Rin": "aMdJrG3", + "Sagiri Izumi": "DIKbdcc", + "Saya Amanogawa": "A72k84T", + "Xiao Pai (That's Me!)": "S4e3r" +} diff --git a/commands/random/karen.js b/commands/random/karen.js deleted file mode 100644 index 8f8322cd..00000000 --- a/commands/random/karen.js +++ /dev/null @@ -1,24 +0,0 @@ -const { Command } = require('discord.js-commando'); -const { randomFromImgurAlbum } = require('../../util/Util'); - -module.exports = class KarenCommand extends Command { - constructor(client) { - super(client, { - name: 'karen', - aliases: ['ayaya'], - group: 'random', - memberName: 'karen', - description: 'Responds with a random image of Karen.', - clientPermissions: ['ATTACH_FILES'] - }); - } - - async run(msg) { - try { - const karen = await randomFromImgurAlbum('3oLAP'); - return msg.say({ files: [karen] }); - } catch (err) { - return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); - } - } -}; diff --git a/commands/random/rate-waifu.js b/commands/random/rate-waifu.js deleted file mode 100644 index f11b405b..00000000 --- a/commands/random/rate-waifu.js +++ /dev/null @@ -1,25 +0,0 @@ -const { Command } = require('discord.js-commando'); - -module.exports = class RateWaifuCommand extends Command { - constructor(client) { - super(client, { - name: 'rate-waifu', - aliases: ['waifu', 'rate'], - group: 'random', - memberName: 'rate-waifu', - description: 'Rates a waifu.', - args: [ - { - key: 'waifu', - prompt: 'Who do you want to rate?', - type: 'string', - max: 1950 - } - ] - }); - } - - run(msg, { waifu }) { - return msg.say(`I'd give ${waifu} a ${Math.floor(Math.random() * 10) + 1}/10!`); - } -}; diff --git a/commands/random/rate.js b/commands/random/rate.js new file mode 100644 index 00000000..8fac63c2 --- /dev/null +++ b/commands/random/rate.js @@ -0,0 +1,25 @@ +const { Command } = require('discord.js-commando'); + +module.exports = class RateCommand extends Command { + constructor(client) { + super(client, { + name: 'rate', + aliases: ['rate-waifu'], + group: 'random', + memberName: 'rate', + description: 'Rates something.', + args: [ + { + key: 'thing', + prompt: 'Who do you want to rate?', + type: 'string', + max: 1950 + } + ] + }); + } + + run(msg, { thing }) { + return msg.say(`I'd give ${thing} a ${Math.floor(Math.random() * 10) + 1}/10!`); + } +}; diff --git a/commands/random/waifu.js b/commands/random/waifu.js new file mode 100644 index 00000000..d897d852 --- /dev/null +++ b/commands/random/waifu.js @@ -0,0 +1,26 @@ +const { Command } = require('discord.js-commando'); +const { randomFromImgurAlbum } = require('../../util/Util'); +const waifus = require('../../assets/json/waifu'); + +module.exports = class WaifuCommand extends Command { + constructor(client) { + super(client, { + name: 'waifu', + group: 'random', + memberName: 'waifu', + description: 'Responds with a random image of one of dragonfire535\'s waifu.', + clientPermissions: ['ATTACH_FILES'] + }); + } + + async run(msg) { + const waifuKeys = Object.keys(waifus); + const waifu = waifuKeys[Math.floor(Math.random() * waifuKeys.length)]; + try { + const waifuImage = await randomFromImgurAlbum(waifu); + return msg.say(waifu, { files: [waifuImage] }); + } catch (err) { + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + } + } +}; diff --git a/package.json b/package.json index 9d19b3b9..b2550a55 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "76.0.0", + "version": "77.0.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {