This is a Bot API/Wrapper for ZekrosTJA goChat
- ws
$ npm i --save gochatapi
Eventname | What it parse | Description |
---|---|---|
Bot_loggedin | -/- | Gets called when the Client logges in |
Bot_disconnected | -/- | Gets called when the Client disconnect |
Bot_error | error | Gets called when the Websocket throws an error |
Client_connected | name | Gets called when a new User connect to the Chat |
Client_disconnected | name | Gets called when a User disconnect from the Chat |
message | message, username, color | Gets called when a User write a message |
Functionname | What they need | Description |
---|---|---|
new Bot | Nickname String, Url String, Prefix String | starts the Bot session |
send | message String | Sends a message in the Chat |
get_prefix | -/- | Give you the current Prefix |
set_prefix | prefix String | Set the Prefix to the given Parameter |
get_nickname | -/- | Give you the current Nickname |
Every Event is in the example file listed
This is a example
const Bot = require('goChatAPI');
var bot1 = new Bot("Bot", "url", "Prefix");
bot1.send("Im cool");