Documentation
¶
Index ¶
Constants ¶
const PSTFormat = "Jan 2 15:04:05 PST"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TwitchProps ¶
type TwitchProps struct { Channel string MsgRate time.Duration Name string Port string OAuthToken string Server string // contains filtered or unexported fields }
func (*TwitchProps) Connect ¶
func (bb *TwitchProps) Connect()
Connects the bot to the Twitch IRC server. The bot will continue to try to connect until it succeeds or is manually shutdown.
func (*TwitchProps) Disconnect ¶
func (bb *TwitchProps) Disconnect()
Officially disconnects the bot from the Twitch IRC server.
func (*TwitchProps) HandleChat ¶
func (bb *TwitchProps) HandleChat() error
Listens for and logs messages from chat. Responds to commands from the channel owner. The bot continues until it gets disconnected, told to shutdown, or forcefully shutdown.
func (*TwitchProps) JoinChannel ¶
func (bb *TwitchProps) JoinChannel()
Makes the bot join its pre-specified channel.
func (*TwitchProps) Say ¶
func (bb *TwitchProps) Say(msg string) error
Makes the bot send a message to the chat channel.
func (*TwitchProps) Start ¶
func (bb *TwitchProps) Start()
Starts a loop where the bot will attempt to connect to the Twitch IRC server, then connect to the pre-specified channel, and then handle the chat. It will attempt to reconnect until it is told to shut down, or is forcefully shutdown.