mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 00:07:36 +02:00
Waifu, change rate-waifu to rate
This commit is contained in:
@@ -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!`);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -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!`);
|
||||
}
|
||||
};
|
||||
@@ -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!`);
|
||||
}
|
||||
};
|
||||
@@ -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!`);
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user