2019-10-28 16:02:00 +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 translate to Yodish!`;
|
2019-11-30 02:00:14 +00:00
|
|
|
const request = await fetch(`https://yoda-api.appspot.com/api/v1/yodish?text=${encodeURIComponent(args.join(" "))}`);
|
2019-10-28 16:02:00 +00:00
|
|
|
const json = await request.json();
|
|
|
|
return json.yodish;
|
|
|
|
};
|
|
|
|
|
2019-12-02 20:47:22 +00:00
|
|
|
exports.aliases = ["yodish"];
|
|
|
|
exports.category = 4;
|
2019-12-05 16:58:46 +00:00
|
|
|
exports.help = "Translates a message to Yodish";
|
|
|
|
exports.params = "[text]";
|