Waifu, change rate-waifu to rate

This commit is contained in:
Daniel Odendahl Jr
2018-05-19 11:51:12 +00:00
parent 734111f3ba
commit 3732030d77
7 changed files with 68 additions and 52 deletions
+2 -2
View File
@@ -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.
+14
View File
@@ -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"
}
-24
View File
@@ -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!`);
}
}
};
-25
View File
@@ -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!`);
}
};
+25
View File
@@ -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!`);
}
};
+26
View File
@@ -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!`);
}
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "76.0.0",
"version": "77.0.0",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {