Documentation ¶
Index ¶
- type Bot
- func (b *Bot) Connect(host string, user, password string) error
- func (b *Bot) HelpHandler(message, room, sender string)
- func (b *Bot) SendMessage(room, message string) error
- func (b *Bot) SendMessageHTML(room, html, altText string) error
- func (b *Bot) SetCommand(command string, description string, handler HandlerFunc)
- func (b *Bot) UnsetCommand(command string)
- type HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct { // EnableUserWhitelist allows enabling a user-whitelist to restrict // bot-usage EnableUserWhitelist bool // contains filtered or unexported fields }
func (*Bot) HelpHandler ¶
HelpHandler autogenerates a short help-document.
func (*Bot) SendMessage ¶
func (*Bot) SendMessageHTML ¶
func (*Bot) SetCommand ¶
func (b *Bot) SetCommand(command string, description string, handler HandlerFunc)
SetCommand allows specifying a handler for a command. The command may not contain spaces (commands with spaces will simply not work)
func (*Bot) UnsetCommand ¶
UnsetCommand removes the specified command if it exists.
type HandlerFunc ¶
Handlerfunc defines the look of functions that may be used as a command-handler
Click to show internal directories.
Click to hide internal directories.