Image Edit Group, Achievement Command

This commit is contained in:
Daniel Odendahl Jr
2017-06-11 16:51:29 +00:00
parent e12eb42380
commit 5478098d2b
5 changed files with 42 additions and 3 deletions
-44
View File
@@ -1,44 +0,0 @@
const Command = require('../../structures/Command');
const codes = require('../../assets/json/meme');
module.exports = class MemeCommand extends Command {
constructor(client) {
super(client, {
name: 'meme',
group: 'random',
memberName: 'meme',
description: 'Sends a Meme with text of your choice, and a background of your choice.',
details: `**Codes:** ${codes.join(', ')}`,
clientPermissions: ['ATTACH_FILES'],
args: [
{
key: 'type',
prompt: 'What meme type do you want to use?',
type: 'string',
validate: (type) => {
if (codes.includes(type.toLowerCase())) return true;
else return 'Invalid meme type. Use `help meme` to view a list of meme types.';
},
parse: (type) => type.toLowerCase()
},
{
key: 'top',
prompt: 'What should the top row of the meme to be?',
type: 'string',
parse: (top) => encodeURIComponent(top.replace(/[ ]/g, '-'))
},
{
key: 'bottom',
prompt: 'What should the bottom row of the meme to be?',
type: 'string',
parse: (bottom) => encodeURIComponent(bottom.replace(/[ ]/g, '-'))
}
]
});
}
run(msg, args) {
const { type, top, bottom } = args;
return msg.say({ files: [`https://memegen.link/${type}/${top}/${bottom}.jpg`] });
}
};
-41
View File
@@ -1,41 +0,0 @@
const Command = require('../../structures/Command');
const pokemon = require('../../assets/json/pokemon-fusion');
module.exports = class PokemonFusionCommand extends Command {
constructor(client) {
super(client, {
name: 'pokemon-fusion',
aliases: ['poke-fusion', 'poke-fuse'],
group: 'random',
memberName: 'pokemon-fusion',
description: 'Fuses two Generation 1 Pokémon together.',
args: [
{
key: 'source1',
prompt: 'What Pokémon should be fused?',
type: 'string',
validate: (source1) => {
if (pokemon[source1.toLowerCase()]) return true;
else return 'Only Pokémon from Generation 1 may be used.';
},
parse: (source1) => pokemon[source1.toLowerCase()]
},
{
key: 'source2',
prompt: 'What Pokémon should be fused?',
type: 'string',
validate: (source2) => {
if (pokemon[source2.toLowerCase()]) return true;
else return 'Only Pokémon from Generation 1 may be used.';
},
parse: (source2) => pokemon[source2.toLowerCase()]
}
]
});
}
run(msg, args) {
const { source1, source2 } = args;
return msg.say(`http://images.alexonsager.net/pokemon/fused/${source1}/${source1}.${source2}.png`);
}
};