Documentation ¶
Index ¶
- type Bot
- func (bot *Bot) AddModule(module *Module)
- func (bot *Bot) GetChannels() []slack.Channel
- func (bot *Bot) MockMessage(event *slack.MessageEvent, isBot checkFunc, isIM checkFunc, ...) *Message
- func (bot *Bot) OpenIMChannel(user string) string
- func (bot *Bot) SendMessage(channel string, message string)
- func (bot *Bot) SetDebug(value bool)
- func (bot *Bot) SetLogger(logger *log.Logger)
- func (bot *Bot) Start()
- type Message
- func (message *Message) GetChannel() *slack.Channel
- func (message *Message) GetUser() *slack.User
- func (message *Message) IsBot() bool
- func (message *Message) IsIM() bool
- func (message *Message) IsMentioned() bool
- func (message *Message) OpenIMChannel(user string) string
- func (message *Message) Respond(messageString string)
- func (message *Message) ToJson() string
- type MessageMock
- type Module
- func (module *Module) AcceptBotMessages()
- func (module *Module) AcceptsBotMessages() bool
- func (module *Module) AddTrigger(regex string, handler TriggerFunc)
- func (module *Module) HandleInput(message *Message)
- func (module *Module) Help() string
- func (module *Module) Info()
- func (module *Module) Name() string
- func (module *Module) SetBot(bot *Bot)
- func (module *Module) SetVersion(version string)
- func (module *Module) Status() bool
- func (module *Module) Version() string
- type Trigger
- type TriggerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
func (*Bot) GetChannels ¶
func (*Bot) MockMessage ¶
func (bot *Bot) MockMessage(event *slack.MessageEvent, isBot checkFunc, isIM checkFunc, isMentioned checkFunc) *Message
func (*Bot) OpenIMChannel ¶
func (*Bot) SendMessage ¶
type Message ¶
type Message struct { *slack.MessageEvent // contains filtered or unexported fields }
func (*Message) GetChannel ¶
func (*Message) IsMentioned ¶
func (*Message) OpenIMChannel ¶
type MessageMock ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) AcceptBotMessages ¶
func (module *Module) AcceptBotMessages()
func (*Module) AcceptsBotMessages ¶
func (*Module) AddTrigger ¶
func (module *Module) AddTrigger(regex string, handler TriggerFunc)
func (*Module) HandleInput ¶
func (*Module) SetVersion ¶
type TriggerFunc ¶
type TriggerFunc func(message *Message)
Click to show internal directories.
Click to hide internal directories.