mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-04 15:56:52 +02:00
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
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' }] });
|
|
}
|
|
};
|
|
|