class TwitchChatClient

Overview

Given a WebSocket and an access token, register a handler for Twitch IRC messages, and then #run the chat client.

Defined in:

kenran/bot.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(sock : HTTP::WebSocket, token : String) #

[View source]

Instance Method Detail

def on_irc_command(&handler : IRC::Command -> ) #

Register a handler that receives all IRC::Commands.


[View source]
def reply_to(id : String, msg : String) #

Reply to message by ID


[View source]
def run #

Actually start the chat client and run it indefinitely, calling the registered IRC command handler for every message.


[View source]
def send_msg(msg : String) #

Send a message to the channel


[View source]