Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Latest commit

 

History

History
65 lines (42 loc) · 1.67 KB

README.md

File metadata and controls

65 lines (42 loc) · 1.67 KB

~ goChatAPI ~

 

 

This is a Bot API/Wrapper for ZekrosTJA goChat


Required Pakckages:

  • ws

Installaton

$ npm i --save gochatapi

Events

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

Finctions

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

How to use Events

Every Event is in the example file listed


How to use Functions

This is a example

const Bot = require('goChatAPI');

var bot1 = new Bot("Bot", "url", "Prefix");

bot1.send("Im cool");