1
0
Fork 0
mirror of https://github.com/ChomeNS/chomens-bot-mc.git synced 2025-04-12 20:24:23 -04:00

*cowsay cow support

This commit is contained in:
ChomeNS 2022-08-28 09:03:14 +07:00
parent afdd1b2465
commit 74cf0b28d4

View file

@ -1,12 +1,13 @@
/* eslint-disable max-len */
const cowsay = require('cowsay2');
const cows = require('cowsay2/cows');
module.exports = {
name: 'cowsay',
alias: [],
description: 'Moo',
usage: '<message>',
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.join(' '))}`}));
bot.core.run('minecraft:tellraw @a ' + JSON.stringify({text: `${cowsay.say(args.slice(1).join(' '), {cow: cows[args[0]]})}`}));
},
};