Versions in this module Expand all Collapse all v0 v0.0.2 May 28, 2020 Changes in this version + func AddFlags(opt *Options) + func ValidateOptions(opt *Options) error + type BotCommand interface + Definition func() *CommandDefinition + Execute func(request Request, response ResponseWriter) + Match func(text string) (*proper.Properties, bool) + Tokenize func() []*commander.Token + Usage func() string + func NewBotCommand(usage string, definition *CommandDefinition) BotCommand + type ClientDefaults struct + Debug bool + type ClientOption func(*ClientDefaults) + func WithDebug(debug bool) ClientOption + type CommandDefinition struct + AuthorizationFunc func(request Request) bool + Description string + Example string + Handler func(request Request, response ResponseWriter) + type Options struct + ListenAddress string + VerificationToken string + type ReplyDefaults struct + Attachments []slack.Attachment + Blocks []slack.Block + ThreadResponse bool + type ReplyOption func(*ReplyDefaults) + func WithAttachments(attachments []slack.Attachment) ReplyOption + func WithBlocks(blocks []slack.Block) ReplyOption + func WithThreadReply(useThread bool) ReplyOption + type ReportErrorDefaults struct + ThreadResponse bool + type ReportErrorOption func(*ReportErrorDefaults) + func WithThreadError(useThread bool) ReportErrorOption + type Request interface + BooleanParam func(key string, defaultValue bool) bool + Context func() context.Context + Event func() *slackevents.MessageEvent + FloatParam func(key string, defaultValue float64) float64 + IntegerParam func(key string, defaultValue int) int + Param func(key string) string + Properties func() *proper.Properties + StringParam func(key string, defaultValue string) string + func NewRequest(ctx context.Context, event *slackevents.MessageEvent, ...) Request + type ResponseWriter interface + Client func() *slack.Client + Reply func(text string, options ...ReplyOption) error + ReportError func(err error, options ...ReportErrorOption) + func NewResponse(event *slackevents.MessageEvent, client *slack.Client) ResponseWriter + type Slacker struct + func NewSlacker(client *slack.Client, opt Options) *Slacker + func (s *Slacker) Command(usage string, definition *CommandDefinition) + func (s *Slacker) DefaultCommand(defaultMessageHandler func(request Request, response ResponseWriter)) + func (s *Slacker) Help(definition *CommandDefinition) + func (s *Slacker) Listen(ctx context.Context) error + func (s *Slacker) Run(ctx context.Context)