Lots of Changes

This commit is contained in:
Daniel Odendahl Jr
2017-08-26 01:20:43 +00:00
parent d2008c749d
commit 56e72f7509
78 changed files with 393 additions and 389 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ module.exports = class AchievementCommand extends Command {
type: 'string',
validate: text => {
if (text.length < 25) return true;
return 'Text must be under 25 characters.';
return 'Please keep the text under 25 characters.';
}
}
]
+6 -5
View File
@@ -1,4 +1,5 @@
const Command = require('../../structures/Command');
const { list } = require('../../structures/Util');
const codes = require('../../assets/json/meme');
module.exports = class MemeCommand extends Command {
@@ -7,17 +8,17 @@ module.exports = class MemeCommand extends Command {
name: 'meme',
group: 'image-edit',
memberName: 'meme',
description: 'Sends a meme with text of your choice, and a background of your choice.',
description: 'Sends a meme with the text and background of your choice.',
clientPermissions: ['ATTACH_FILES'],
details: `**Codes:** ${codes.join(', ')}`,
args: [
{
key: 'type',
prompt: 'What meme type do you want to use?',
prompt: `What meme type do you want to use? Either ${list(codes, 'or')}.`,
type: 'string',
validate: type => {
if (codes.includes(type.toLowerCase())) return true;
return 'Invalid meme type. Use `help meme` to view a list of meme types.';
return `Invalid meme type, please enter either ${list(codes, 'or')}.`;
},
parse: type => type.toLowerCase()
},
@@ -29,7 +30,7 @@ module.exports = class MemeCommand extends Command {
if (top.length < 200) return true;
return 'Please keep the top text under 200 characters.';
},
parse: top => encodeURIComponent(top.replace(/[ ]/g, '-'))
parse: top => encodeURIComponent(top.replace(/ /g, '-'))
},
{
key: 'bottom',
@@ -39,7 +40,7 @@ module.exports = class MemeCommand extends Command {
if (bottom.length < 200) return true;
return 'Please keep the bottom text under 200 characters.';
},
parse: bottom => encodeURIComponent(bottom.replace(/[ ]/g, '-'))
parse: bottom => encodeURIComponent(bottom.replace(/ /g, '-'))
}
]
});
+13 -13
View File
@@ -5,37 +5,37 @@ module.exports = class PokemonFusionCommand extends Command {
constructor(client) {
super(client, {
name: 'pokemon-fusion',
aliases: ['poke-fusion', 'poke-fuse'],
aliases: ['poke-fusion', 'poke-fuse', 'pokémon-fusion', 'poké-fusion', 'poké-fuse'],
group: 'image-edit',
memberName: 'pokemon-fusion',
description: 'Fuses two Generation I Pokémon together.',
args: [
{
key: 'source1',
key: 'body',
prompt: 'What Pokémon should be fused?',
type: 'string',
validate: source1 => {
if (pokemon[source1.toLowerCase()]) return true;
return 'Only Pokémon from Generation I may be used.';
validate: body => {
if (pokemon[body.toLowerCase()]) return true;
return 'Invalid body, only Pokémon from Generation I may be used.';
},
parse: source1 => pokemon[source1.toLowerCase()]
parse: body => pokemon[body.toLowerCase()]
},
{
key: 'source2',
key: 'palette',
prompt: 'What Pokémon should be fused?',
type: 'string',
validate: source2 => {
if (pokemon[source2.toLowerCase()]) return true;
return 'Only Pokémon from Generation I may be used.';
validate: palette => {
if (pokemon[palette.toLowerCase()]) return true;
return 'Invalid palette, only Pokémon from Generation I may be used.';
},
parse: source2 => pokemon[source2.toLowerCase()]
parse: palette => pokemon[palette.toLowerCase()]
}
]
});
}
run(msg, args) {
const { source1, source2 } = args;
return msg.say(`http://images.alexonsager.net/pokemon/fused/${source1}/${source1}.${source2}.png`);
const { body, palette } = args;
return msg.say(`http://images.alexonsager.net/pokemon/fused/${body}/${palette}.${body}.png`);
}
};