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:
parent
afdd1b2465
commit
74cf0b28d4
1 changed files with 3 additions and 2 deletions
|
@ -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]]})}`}));
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue