Wazarr94 / haxball_bot_headless

Ready-to-go scripts and functions for the HaxBall Headless API !
MIT License
46 stars 74 forks source link

How admins can write text in different colors #15

Closed nas0s closed 3 years ago

nas0s commented 3 years ago

I examined the basic structure of the code and the document. I have to use the sendAnnoncument function, I also understood that neither found an example nor understood it myself.

I want the admins to write in red and I want the answers given by the bot (like !cs, !win, !me) to be in yellow and bold eras.

I'm using Level 4.

ghost commented 3 years ago

var room = HBInit({}); room.onPlayerChat = (player,message) =>{ if(player.admin){room.sendAnnouncement(message,null,color); return false;} }