2019-09-13 20:02:41 +00:00
|
|
|
const fetch = require("node-fetch");
|
|
|
|
|
|
|
|
exports.run = async (message, args) => {
|
|
|
|
if (args.length === 0) return `${message.author.mention}, you need to provide some text to generate a Minecraft achievement!`;
|
|
|
|
message.channel.sendTyping();
|
2019-11-30 02:00:14 +00:00
|
|
|
const request = await fetch(`https://www.minecraftskinstealer.com/achievement/a.php?i=13&h=Achievement+get%21&t=${encodeURIComponent(args.join("+"))}`);
|
2020-04-12 19:51:48 +00:00
|
|
|
return {
|
2020-02-13 20:31:40 +00:00
|
|
|
file: await request.buffer(),
|
2019-09-13 20:02:41 +00:00
|
|
|
name: "mc.png"
|
2020-04-12 19:51:48 +00:00
|
|
|
};
|
2019-09-13 20:02:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
exports.aliases = ["ach", "achievement", "minecraft"];
|
2019-12-02 20:47:22 +00:00
|
|
|
exports.category = 4;
|
2019-12-05 16:58:46 +00:00
|
|
|
exports.help = "Generates a Minecraft achievement image";
|
|
|
|
exports.params = "[text]";
|