mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-12 00:04:48 +02:00
23
This commit is contained in:
@@ -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' }] });
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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`] });
|
||||
}
|
||||
};
|
||||
@@ -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`);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user