chomens-bot-js/commands/cowsay.js
2022-08-28 09:03:14 +07:00

13 lines
428 B
JavaScript

/* eslint-disable max-len */
const cowsay = require('cowsay2');
const cows = require('cowsay2/cows');
module.exports = {
name: 'cowsay',
alias: [],
description: 'Moo',
usage: '<cow> <message>',
trusted: 0,
execute: function(bot, username, usernameraw, sender, prefix, args) {
bot.core.run('minecraft:tellraw @a ' + JSON.stringify({text: `${cowsay.say(args.slice(1).join(' '), {cow: cows[args[0]]})}`}));
},
};