This commit is contained in:
Daniel Odendahl Jr
2017-06-17 03:26:31 +00:00
parent 5bb78126a9
commit fd4e35533a
129 changed files with 322 additions and 319 deletions
+38
View File
@@ -0,0 +1,38 @@
const Command = require('../../structures/Command');
const snekfetch = require('snekfetch');
module.exports = class AchievementCommand extends Command {
constructor(client) {
super(client, {
name: 'achievement',
group: 'image-edit',
memberName: 'achievement',
description: 'Sends a Minecraft achievement with the text of your choice.',
clientPermissions: ['ATTACH_FILES'],
args: [
{
key: 'text',
prompt: 'What should the text of the achievement be?',
type: 'string',
validate: (text) => {
if (text.length < 25) return true;
else return 'Text must be under 25 characters.';
}
}
]
});
}
async run(msg, args) {
const { text } = args;
const { body } = await snekfetch
.get('https://www.minecraftskinstealer.com/achievement/a.php')
.query({
i: 1,
h: 'Achievement Get!',
t: text
});
return msg.say({ files: [{ attachment: body, name: 'achievement.png' }] });
}
};
+44
View File
@@ -0,0 +1,44 @@
const Command = require('../../structures/Command');
const codes = require('../../assets/json/meme');
module.exports = class MemeCommand extends Command {
constructor(client) {
super(client, {
name: 'meme',
group: 'image-edit',
memberName: 'meme',
description: 'Sends a meme with text of your choice, and a background of your choice.',
clientPermissions: ['ATTACH_FILES'],
details: `**Codes:** ${codes.join(', ')}`,
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
@@ -0,0 +1,41 @@
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: 'image-edit',
memberName: 'pokemon-fusion',
description: 'Fuses two Generation I 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 I 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 I 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`);
}
};