//Connect starts connection to active server, and stores its pointer in Hitbot struct.
Connect starts connection to active server, and stores its pointer in Hitbot struct.
// Connect starts connection to active server and stores its pointer in Hitbot struct .
func (bot *Hitbot) Connect(channels ...string) {
	dialer := websocket.Dialer{}
	c, _, err := dialer.Dial("ws://"+bot.servers[bot.activeServer].ServerIP+"/socket.io/1/websocket/"+bot.connID, nil)
	if err != nil {
		log.Fatal(err)
	}
	bot.conn = c
	bot.channels = channels
}
func ( bot * Hitbot ) Connect ( channels ... string ) { dialer := websocket . Dialer { } c , _ , err := dialer . Dial ( " " + bot . servers [ bot . activeServer ] . ServerIP + " " + bot . connID , nil ) if err != nil { log . Fatal ( err ) } bot . conn = c bot . channels = channels }
Connect starts connection to active server, and stores its pointer in Hitbot struct.
Connect starts connection to active server and stores its pointer in Hitbot struct .