2021-03-05 18:06:22 +00:00
|
|
|
const cowsay = require("cowsay2");
|
|
|
|
const cows = require("cowsay2/cows");
|
2019-09-13 20:02:41 +00:00
|
|
|
|
|
|
|
exports.run = async (message, args) => {
|
|
|
|
if (args.length === 0) {
|
|
|
|
return `${message.author.mention}, you need to provide some text for the cow to say!`;
|
2021-03-05 18:06:22 +00:00
|
|
|
} else if (cows[args[0].toLowerCase()] != undefined) {
|
|
|
|
const cow = cows[args.shift().toLowerCase()];
|
|
|
|
return `\`\`\`\n${cowsay.say(args.join(" "), {
|
|
|
|
cow
|
2019-09-13 20:02:41 +00:00
|
|
|
})}\n\`\`\``;
|
|
|
|
} else {
|
2021-03-05 18:06:22 +00:00
|
|
|
return `\`\`\`\n${cowsay.say(args.join(" "))}\n\`\`\``;
|
2019-09-13 20:02:41 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
exports.aliases = ["cow"];
|
2019-12-02 20:47:22 +00:00
|
|
|
exports.category = 4;
|
|
|
|
exports.help = "Makes an ASCII cow say a message";
|
2019-12-05 16:58:46 +00:00
|
|
|
exports.params = "[text]";
|