catbase/bot/interfaces.go

20 lines
479 B
Go
Raw Normal View History

2016-03-10 18:37:07 +00:00
package bot
type Connector interface {
2016-03-11 02:11:52 +00:00
RegisterEventReceived(func(message Message))
RegisterMessageReceived(func(message Message))
2016-03-10 18:37:07 +00:00
SendMessage(channel, message string)
SendAction(channel, message string)
Serve()
}
// Interface used for compatibility with the Plugin interface
type Handler interface {
Message(message Message) bool
Event(kind string, message Message) bool
BotMessage(message Message) bool
Help(channel string, parts []string)
RegisterWeb() *string
}