Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Answer answer
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command is a bot command.
func (*Command) Description ¶
func (*Command) SetHandler ¶
type Handler ¶
func AddReactionAndSendThreadMessage ¶
AddReactionAndSendThreadMessage return a new Handler that adds the given reaction to the user message with the incoming command and sends the given message to a new thread for the user message.
func NewInvalidUserCommandHandler ¶
NewInvalidUserCommandHandler returns a new Handler in case the command is invalid.
func NewNotFoundCommandHandler ¶
NewNotFoundCommandHandler returns a new Handler in case the command is not found.
type List ¶
type List []Command
func (List) Commands ¶
Commands returns the slice of the underlying core.Command's.
func (List) HandlerLookup ¶
func (ls List) HandlerLookup( ctx context.Context, client *core.Client, userCommandText api.Command, ) (context.Context, Handler)
HandlerLookup is looking for Handler corresponding the given core.Command. It returns:
- the given context if the command has no variables, otherwise, a derived context.Context with Variables;
- NewInvalidUserCommandHandler if the command is invalid, or NewNotFoundCommandHandler if the command is not found, otherwise corresponding Handler.
type NoContentResponse ¶
type NoContentResponse = api.CommandPostNoContent
type Request ¶
type Request = api.WebhookRequest
type Responser ¶
type Responser = api.CommandPostRes
Click to show internal directories.
Click to hide internal directories.