mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-13 00:09:08 +02:00
Updates
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const { stripIndents } = require('common-tags');
|
||||
const answers = require('../../assets/json/8-ball');
|
||||
|
||||
module.exports = class EightBallCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: '8-ball',
|
||||
aliases: ['magic-8-ball', 'eight-ball', 'magic-eight-ball'],
|
||||
group: 'random-res',
|
||||
memberName: '8-ball',
|
||||
description: 'Asks your question to the Magic 8 Ball.',
|
||||
args: [
|
||||
{
|
||||
key: 'question',
|
||||
prompt: 'What do you want to ask the 8 ball?',
|
||||
type: 'string',
|
||||
max: 1950
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { question }) {
|
||||
return msg.say(stripIndents`
|
||||
${question}
|
||||
🎱 ${answers[Math.floor(Math.random() * answers.length)]} 🎱
|
||||
`);
|
||||
}
|
||||
};
|
||||
@@ -1,18 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const facts = require('../../assets/json/cat-fact');
|
||||
|
||||
module.exports = class CatFactCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'cat-fact',
|
||||
aliases: ['neko-fact', 'kitty-fact'],
|
||||
group: 'random-res',
|
||||
memberName: 'cat-fact',
|
||||
description: 'Responds with a cat fact.'
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
return msg.say(facts[Math.floor(Math.random() * facts.length)]);
|
||||
}
|
||||
};
|
||||
@@ -1,24 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const snekfetch = require('snekfetch');
|
||||
|
||||
module.exports = class CatCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'cat',
|
||||
aliases: ['neko', 'kitty'],
|
||||
group: 'random-res',
|
||||
memberName: 'cat',
|
||||
description: 'Responds with a random cat image.',
|
||||
clientPermissions: ['ATTACH_FILES']
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg) {
|
||||
try {
|
||||
const { body } = await snekfetch.get('http://random.cat/meow');
|
||||
return msg.say({ files: [body.file] });
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1,39 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const { stripIndent } = require('common-tags');
|
||||
const answers = ['yes', 'no'];
|
||||
|
||||
module.exports = class CharlieCharlieChallengeCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'charlie-charlie-challenge',
|
||||
aliases: ['charlie-charlie'],
|
||||
group: 'random-res',
|
||||
memberName: 'charlie-charlie-challenge',
|
||||
description: 'Asks your question to Charlie.',
|
||||
args: [
|
||||
{
|
||||
key: 'question',
|
||||
prompt: 'What do you want to ask Charlie?',
|
||||
type: 'string',
|
||||
max: 1900
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { question }) {
|
||||
const answer = answers[Math.floor(Math.random() * answers.length)];
|
||||
return msg.say(stripIndent`
|
||||
${question}
|
||||
\`\`\`
|
||||
${answer === 'no' ? '\\' : ' '} | ${answer === 'yes' ? '/' : ' '}
|
||||
NO ${answer === 'no' ? '\\' : ' '} | ${answer === 'yes' ? '/' : ' '}YES
|
||||
${answer === 'no' ? '\\' : ' '}|${answer === 'yes' ? '/' : ' '}
|
||||
————————————————
|
||||
${answer === 'yes' ? '/' : ' '}|${answer === 'no' ? '\\' : ' '}
|
||||
YES${answer === 'yes' ? '/' : ' '} | ${answer === 'no' ? '\\' : ' '}NO
|
||||
${answer === 'yes' ? '/' : ' '} | ${answer === 'no' ? '\\' : ' '}
|
||||
\`\`\`
|
||||
`);
|
||||
}
|
||||
};
|
||||
@@ -1,26 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
|
||||
module.exports = class ChooseCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'choose',
|
||||
aliases: ['pick'],
|
||||
group: 'random-res',
|
||||
memberName: 'choose',
|
||||
description: 'Chooses between options you provide.',
|
||||
args: [
|
||||
{
|
||||
key: 'choices',
|
||||
prompt: 'What choices do you want me pick from?',
|
||||
type: 'string',
|
||||
infinite: true,
|
||||
max: 1950
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { choices }) {
|
||||
return msg.say(`I choose ${choices[Math.floor(Math.random() * choices.length)]}!`);
|
||||
}
|
||||
};
|
||||
@@ -1,36 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const snekfetch = require('snekfetch');
|
||||
|
||||
module.exports = class ChuckNorrisCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'chuck-norris',
|
||||
aliases: ['chuck', 'norris'],
|
||||
group: 'random-res',
|
||||
memberName: 'chuck-norris',
|
||||
description: 'Responds with a Chuck Norris quote.',
|
||||
args: [
|
||||
{
|
||||
key: 'name',
|
||||
prompt: 'What would you like the name to be?',
|
||||
type: 'string',
|
||||
default: 'Chuck'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { name }) {
|
||||
try {
|
||||
const { body } = await snekfetch
|
||||
.get('http://api.icndb.com/jokes/random')
|
||||
.query({
|
||||
escape: 'javascript',
|
||||
firstName: name
|
||||
});
|
||||
return msg.say(body.value.joke);
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1,18 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const sides = ['heads', 'tails'];
|
||||
|
||||
module.exports = class CoinCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'coin',
|
||||
aliases: ['coin-flip', 'flip'],
|
||||
group: 'random-res',
|
||||
memberName: 'coin',
|
||||
description: 'Flips a coin.'
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
return msg.say(`It landed on ${sides[Math.floor(Math.random() * sides.length)]}!`);
|
||||
}
|
||||
};
|
||||
@@ -1,26 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const compliments = require('../../assets/json/compliment');
|
||||
|
||||
module.exports = class ComplimentCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'compliment',
|
||||
group: 'random-res',
|
||||
memberName: 'compliment',
|
||||
description: 'Compliments a user.',
|
||||
args: [
|
||||
{
|
||||
key: 'user',
|
||||
prompt: 'What user do you want to compliment?',
|
||||
type: 'user',
|
||||
default: ''
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { user }) {
|
||||
if (!user) user = msg.author;
|
||||
return msg.say(`${user.username}, ${compliments[Math.floor(Math.random() * compliments.length)]}`);
|
||||
}
|
||||
};
|
||||
@@ -1,18 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const facts = require('../../assets/json/dog-fact');
|
||||
|
||||
module.exports = class DogFactCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'dog-fact',
|
||||
aliases: ['puppy-fact'],
|
||||
group: 'random-res',
|
||||
memberName: 'dog-fact',
|
||||
description: 'Responds with a dog fact.'
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
return msg.say(facts[Math.floor(Math.random() * facts.length)]);
|
||||
}
|
||||
};
|
||||
@@ -1,24 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const snekfetch = require('snekfetch');
|
||||
|
||||
module.exports = class DogCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'dog',
|
||||
aliases: ['puppy'],
|
||||
group: 'random-res',
|
||||
memberName: 'dog',
|
||||
description: 'Responds with a random dog image.',
|
||||
clientPermissions: ['ATTACH_FILES']
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg) {
|
||||
try {
|
||||
const { body } = await snekfetch.get('https://dog.ceo/api/breeds/image/random');
|
||||
return msg.say({ files: [body.message] });
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1,17 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const facts = require('../../assets/json/fact-core');
|
||||
|
||||
module.exports = class FactCoreCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'fact-core',
|
||||
group: 'random-res',
|
||||
memberName: 'fact-core',
|
||||
description: 'Responds with a random Fact Core quote.'
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
return msg.say(facts[Math.floor(Math.random() * facts.length)]);
|
||||
}
|
||||
};
|
||||
@@ -1,19 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const nimbats = require('../../assets/json/fidget');
|
||||
|
||||
module.exports = class FidgetCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'fidget',
|
||||
aliases: ['nimbat'],
|
||||
group: 'random-res',
|
||||
memberName: 'fidget',
|
||||
description: 'Responds with a random image of Fidget.',
|
||||
clientPermissions: ['ATTACH_FILES']
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
return msg.say({ files: [nimbats[Math.floor(Math.random() * nimbats.length)]] });
|
||||
}
|
||||
};
|
||||
@@ -1,22 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const { stripIndents } = require('common-tags');
|
||||
const fortunes = require('../../assets/json/fortune');
|
||||
|
||||
module.exports = class FortuneCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'fortune',
|
||||
aliases: ['fortune-cookie'],
|
||||
group: 'random-res',
|
||||
memberName: 'fortune',
|
||||
description: 'Responds with a random fortune.'
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
return msg.say(stripIndents`
|
||||
${fortunes[Math.floor(Math.random() * fortunes.length)]}
|
||||
${Array.from({ length: 6 }, () => Math.floor(Math.random() * 100)).join(', ')}
|
||||
`);
|
||||
}
|
||||
};
|
||||
@@ -1,45 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const { oneLine } = require('common-tags');
|
||||
const { randomRange } = require('../../util/Util');
|
||||
const genders = ['male', 'female'];
|
||||
const eyeColors = ['blue', 'brown', 'hazel', 'green', 'yellow'];
|
||||
const hairColors = ['blonde', 'brown', 'red', 'black', 'grey', 'white'];
|
||||
const hairStyles = ['curly', 'straight', 'wavy', 'long', 'shoulder-length', 'short', 'balding'];
|
||||
const extras = ['freckles', 'glasses', 'dimples', 'contacts', 'loads of acne', 'pretty smile', 'braces'];
|
||||
|
||||
module.exports = class GuessMyLooksCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'guess-my-looks',
|
||||
aliases: ['guess-looks'],
|
||||
group: 'random-res',
|
||||
memberName: 'guess-my-looks',
|
||||
description: 'Guesses what you look like.',
|
||||
args: [
|
||||
{
|
||||
key: 'user',
|
||||
prompt: 'Which user do you want me to guess the looks of?',
|
||||
type: 'user',
|
||||
default: ''
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { user }) {
|
||||
if (!user) user = msg.author;
|
||||
const gender = genders[Math.floor(Math.random() * genders.length)];
|
||||
const eyeColor = eyeColors[Math.floor(Math.random() * eyeColors.length)];
|
||||
const hairColor = hairColors[Math.floor(Math.random() * hairColors.length)];
|
||||
const hairStyle = hairStyles[Math.floor(Math.random() * hairStyles.length)];
|
||||
const age = randomRange(10, 100);
|
||||
const feet = randomRange(3, 7);
|
||||
const inches = Math.floor(Math.random() * 12);
|
||||
const weight = randomRange(50, 300);
|
||||
const extra = extras[Math.floor(Math.random() * extras.length)];
|
||||
return msg.say(oneLine`
|
||||
I think ${user.username} is a ${age} year old ${gender} with ${eyeColor} eyes and ${hairStyle} ${hairColor}
|
||||
hair. They are ${feet}'${inches}" and weigh ${weight} pounds. Don't forget the ${extra}!
|
||||
`);
|
||||
}
|
||||
};
|
||||
@@ -1,17 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const jokes = require('../../assets/json/joke');
|
||||
|
||||
module.exports = class JokeCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'joke',
|
||||
group: 'random-res',
|
||||
memberName: 'joke',
|
||||
description: 'Responds with a random joke.'
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
return msg.say(jokes[Math.floor(Math.random() * jokes.length)]);
|
||||
}
|
||||
};
|
||||
@@ -1,42 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const { shuffle } = require('../../util/Util');
|
||||
|
||||
module.exports = class KissMarryKillCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'kiss-marry-kill',
|
||||
aliases: ['kiss-kill-marry', 'kill-kiss-marry', 'kill-marry-kiss', 'marry-kiss-kill', 'marry-kill-kiss'],
|
||||
group: 'random-res',
|
||||
memberName: 'kiss-marry-kill',
|
||||
description: 'Decides who to kiss, who to marry, and who to kill.',
|
||||
args: [
|
||||
{
|
||||
key: 'thing1',
|
||||
label: 'first name',
|
||||
prompt: 'Who is the first person you choose?',
|
||||
type: 'string',
|
||||
max: 500
|
||||
},
|
||||
{
|
||||
key: 'thing2',
|
||||
label: 'second name',
|
||||
prompt: 'Who is the second person you choose?',
|
||||
type: 'string',
|
||||
max: 500
|
||||
},
|
||||
{
|
||||
key: 'thing3',
|
||||
label: 'third name',
|
||||
prompt: 'Who is the third person you choose?',
|
||||
type: 'string',
|
||||
max: 500
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { thing1, thing2, thing3 }) {
|
||||
const things = shuffle([thing1, thing2, thing3]);
|
||||
return msg.say(`I'd kiss ${things[0]}, marry ${things[1]}, and kill ${things[2]}.`);
|
||||
}
|
||||
};
|
||||
@@ -1,30 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const { stripIndents } = require('common-tags');
|
||||
const answers = ['Maybe someday', 'Nothing', 'Neither', 'I don\'t think so', 'Yes', 'Try asking again'];
|
||||
|
||||
module.exports = class MagicConchCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'magic-conch',
|
||||
aliases: ['magic-conch-shell'],
|
||||
group: 'random-res',
|
||||
memberName: 'magic-conch',
|
||||
description: 'Asks your question to the Magic Conch.',
|
||||
args: [
|
||||
{
|
||||
key: 'question',
|
||||
prompt: 'What do you want to ask the magic conch?',
|
||||
type: 'string',
|
||||
max: 1950
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { question }) {
|
||||
return msg.say(stripIndents`
|
||||
${question}
|
||||
🐚 ${answers[Math.floor(Math.random() * answers.length)]} 🐚
|
||||
`);
|
||||
}
|
||||
};
|
||||
@@ -1,43 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const snekfetch = require('snekfetch');
|
||||
const { list } = require('../../util/Util');
|
||||
const genders = ['male', 'female', 'both'];
|
||||
|
||||
module.exports = class NameCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'name',
|
||||
group: 'random-res',
|
||||
memberName: 'name',
|
||||
description: 'Responds with a random name, with the gender of your choice.',
|
||||
args: [
|
||||
{
|
||||
key: 'gender',
|
||||
prompt: `Which gender do you want to generate a name for? Either ${list(genders, 'or')}.`,
|
||||
type: 'string',
|
||||
default: 'both',
|
||||
validate: gender => {
|
||||
if (genders.includes(gender.toLowerCase())) return true;
|
||||
return `Invalid gender, please enter either ${list(genders, 'or')}.`;
|
||||
},
|
||||
parse: gender => gender.toLowerCase()
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { gender }) {
|
||||
try {
|
||||
const { body } = await snekfetch
|
||||
.get('http://namey.muffinlabs.com/name.json')
|
||||
.query({
|
||||
with_surname: true,
|
||||
type: gender,
|
||||
frequency: 'all'
|
||||
});
|
||||
return msg.say(body[0]);
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1,30 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const snekfetch = require('snekfetch');
|
||||
|
||||
module.exports = class NumberFactCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'number-fact',
|
||||
group: 'random-res',
|
||||
memberName: 'number-fact',
|
||||
description: 'Responds with a random fact about a number.',
|
||||
args: [
|
||||
{
|
||||
key: 'number',
|
||||
prompt: 'What number do you want to get a fact for?',
|
||||
type: 'integer'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { number }) {
|
||||
try {
|
||||
const { text } = await snekfetch.get(`http://numbersapi.com/${number}`);
|
||||
return msg.say(text);
|
||||
} catch (err) {
|
||||
if (err.status === 404) return msg.say('Could not find any results.');
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1,18 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const genders = ['boy', 'girl'];
|
||||
|
||||
module.exports = class OffspringCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'offspring',
|
||||
aliases: ['sex'],
|
||||
group: 'random-res',
|
||||
memberName: 'offspring',
|
||||
description: 'Decides if your new child will be a boy or a girl.'
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
return msg.say(`It's a ${genders[Math.floor(Math.random() * genders.length)]}!`);
|
||||
}
|
||||
};
|
||||
@@ -1,19 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const pikachus = require('../../assets/json/pikachu');
|
||||
|
||||
module.exports = class PikachuCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'pikachu',
|
||||
aliases: ['pika'],
|
||||
group: 'random-res',
|
||||
memberName: 'pikachu',
|
||||
description: 'Responds with a random image of Pikachu.',
|
||||
clientPermissions: ['ATTACH_FILES']
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
return msg.say({ files: [pikachus[Math.floor(Math.random() * pikachus.length)]] });
|
||||
}
|
||||
};
|
||||
@@ -1,18 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const sides = ['on NaN', 'on 0', 'in the air', 'on null', 'on undefined', 'on \'\''];
|
||||
|
||||
module.exports = class QuantumCoinCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'quantum-coin',
|
||||
aliases: ['q-coin'],
|
||||
group: 'random-res',
|
||||
memberName: 'quantum-coin',
|
||||
description: 'Flips a coin that lands on some form of nothing.'
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
return msg.say(`It landed ${sides[Math.floor(Math.random() * sides.length)]}.`);
|
||||
}
|
||||
};
|
||||
@@ -1,22 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const snekfetch = require('snekfetch');
|
||||
|
||||
module.exports = class QuoteCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'quote',
|
||||
group: 'random-res',
|
||||
memberName: 'quote',
|
||||
description: 'Responds with a random quote.'
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg) {
|
||||
try {
|
||||
const { body } = await snekfetch.get('https://talaikis.com/api/quotes/random/');
|
||||
return msg.say(`${body.quote} - _${body.author}_`);
|
||||
} 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-res',
|
||||
memberName: 'rate-waifu',
|
||||
description: 'Rates your 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!`);
|
||||
}
|
||||
};
|
||||
@@ -1,26 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const roasts = require('../../assets/json/roast');
|
||||
|
||||
module.exports = class RoastCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'roast',
|
||||
group: 'random-res',
|
||||
memberName: 'roast',
|
||||
description: 'Roasts a user.',
|
||||
args: [
|
||||
{
|
||||
key: 'user',
|
||||
prompt: 'What user do you want to roast?',
|
||||
type: 'user',
|
||||
default: ''
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { user }) {
|
||||
if (!user) user = msg.author;
|
||||
return msg.say(`${user.username}, ${roasts[Math.floor(Math.random() * roasts.length)]}`);
|
||||
}
|
||||
};
|
||||
@@ -1,26 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
|
||||
module.exports = class RollCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'roll',
|
||||
aliases: ['dice'],
|
||||
group: 'random-res',
|
||||
memberName: 'roll',
|
||||
description: 'Rolls a dice with a maximum value of your choice.',
|
||||
args: [
|
||||
{
|
||||
key: 'value',
|
||||
label: 'maximum number',
|
||||
prompt: 'What is the maximum number you wish to appear?',
|
||||
type: 'integer',
|
||||
default: 6
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { value }) {
|
||||
return msg.say(`You rolled a ${Math.floor(Math.random() * value) + 1}.`);
|
||||
}
|
||||
};
|
||||
@@ -1,17 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
|
||||
module.exports = class RouletteCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'roulette',
|
||||
group: 'random-res',
|
||||
memberName: 'roulette',
|
||||
description: 'Chooses a random member of the server.',
|
||||
guildOnly: true
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
return msg.say(`I choose ${msg.guild.members.random().displayName}!`);
|
||||
}
|
||||
};
|
||||
@@ -1,18 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const crypto = require('crypto');
|
||||
|
||||
module.exports = class SecurityKeyCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'security-key',
|
||||
aliases: ['crypto', 'crypto-key'],
|
||||
group: 'random-res',
|
||||
memberName: 'security-key',
|
||||
description: 'Generates a random security key.'
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
return msg.say(crypto.randomBytes(15).toString('hex'));
|
||||
}
|
||||
};
|
||||
@@ -1,32 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
|
||||
module.exports = class ShipCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'ship',
|
||||
group: 'random-res',
|
||||
memberName: 'ship',
|
||||
description: 'Ships things/people together.',
|
||||
args: [
|
||||
{
|
||||
key: 'thing1',
|
||||
label: 'first name',
|
||||
prompt: 'Who is the first person in the ship?',
|
||||
type: 'string',
|
||||
max: 500
|
||||
},
|
||||
{
|
||||
key: 'thing2',
|
||||
label: 'second name',
|
||||
prompt: 'Who is the second person in the ship?',
|
||||
type: 'string',
|
||||
max: 500
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { thing1, thing2 }) {
|
||||
return msg.say(`I'd give ${thing1} and ${thing2} a ${Math.floor(Math.random() * 100) + 1}%!`);
|
||||
}
|
||||
};
|
||||
@@ -1,27 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const snekfetch = require('snekfetch');
|
||||
|
||||
module.exports = class ShowerThoughtCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'shower-thought',
|
||||
aliases: ['shower-thoughts'],
|
||||
group: 'random-res',
|
||||
memberName: 'shower-thought',
|
||||
description: 'Responds with a random shower thought, directly from r/Showerthoughts.'
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg) {
|
||||
try {
|
||||
const { body } = await snekfetch
|
||||
.get('https://www.reddit.com/r/Showerthoughts.json')
|
||||
.query({ limit: 1000 });
|
||||
const allowed = msg.channel.nsfw ? body.data.children : body.data.children.filter(post => !post.data.over_18);
|
||||
if (!allowed.length) return msg.say('Hmm... It seems the thoughts are all gone right now. Try again later!');
|
||||
return msg.say(allowed[Math.floor(Math.random() * allowed.length)].data.title);
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1,18 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const questions = require('../../assets/json/would-you-rather');
|
||||
|
||||
module.exports = class WouldYouRatherCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'would-you-rather',
|
||||
aliases: ['wy-rather'],
|
||||
group: 'random-res',
|
||||
memberName: 'would-you-rather',
|
||||
description: 'Responds with a random would you rather question.'
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
return msg.say(questions[Math.floor(Math.random() * questions.length)]);
|
||||
}
|
||||
};
|
||||
@@ -1,19 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const xiaos = require('../../assets/json/xiao');
|
||||
|
||||
module.exports = class XiaoCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'xiao',
|
||||
aliases: ['xiao-pai', 'iao'],
|
||||
group: 'random-res',
|
||||
memberName: 'xiao',
|
||||
description: 'Responds with a random image of Xiao Pai.',
|
||||
clientPermissions: ['ATTACH_FILES']
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
return msg.say({ files: [xiaos[Math.floor(Math.random() * xiaos.length)]] });
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user