Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) Command ¶
func (a *App) Command(name string, handler CommandHandler)
func (*App) OnText ¶
func (a *App) OnText(handler TextHandler)
type CommandHandler ¶
type CommandHandler func(context.Context, Conversation, ParsedCommand) error
type Conversation ¶
type Delivery ¶
type Delivery struct {
To Recipient
Kind MessageKind
Body string
Reply *ReplyContext
}
type Incoming ¶
type Incoming struct {
ID string
Kind IncomingKind
From string
To Recipient
Text string
At time.Time
Raw json.RawMessage
}
type IncomingKind ¶
type IncomingKind string
const ( DirectMessage IncomingKind = "direct_message" GroupMention IncomingKind = "group_mention" )
type MessageKind ¶
type MessageKind string
const ( PlainText MessageKind = "text" Markdown MessageKind = "markdown" )
type Option ¶
type Option func(*options)
func WithDedupWindow ¶
func WithIntents ¶
func WithPrefix ¶
func WithUnknownCommand ¶
func WithUnknownCommand(handler CommandHandler) Option
type ParsedCommand ¶
type Recipient ¶
type Recipient struct {
Kind RecipientKind
ID string
}
type RecipientKind ¶
type RecipientKind string
const ( DirectRecipient RecipientKind = "direct" GroupRecipient RecipientKind = "group" ChannelRecipient RecipientKind = "channel" )
type ReplyContext ¶
type TextHandler ¶
type TextHandler func(context.Context, Conversation) error
Click to show internal directories.
Click to hide internal directories.