Documentation
¶
Index ¶
- func ExtractReactionName(reaction string) string
- func IsReaction(reaction string) bool
- func NewClient(botToken string, options ...Option) (*client, error)
- func NewSocketClient(client Client, debugMode bool) *socketClient
- func RemoveSkinToneFromReaction(reaction string) string
- type APIError
- type Client
- type EventHandlerFunc
- type HandlerFactory
- type Listener
- type MentionEventHandler
- type Option
- type SocketClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractReactionName ¶ added in v1.1.0
ExtractReactionName extracts reaction name (reaction) from reaction string (:reaction:)
func IsReaction ¶ added in v1.1.0
IsReaction judges whether an argument is reaction string or not.
func NewSocketClient ¶
func RemoveSkinToneFromReaction ¶ added in v1.1.0
RemoveSkinToneFromReaction uses regexp to remove the skin-tone string
Types ¶
type Client ¶
type Client interface {
PostMessage(ctx context.Context, channelID, message, ts string) error
PostEphemeral(ctx context.Context, channelID, userID, ts, message string) error
GetConversationReplies(ctx context.Context, channelID, ts string) ([]slack.Message, error)
GetUsersInfo(ctx context.Context, userID ...string) (*[]slack.User, error)
GetReaction(ctx context.Context, channelID, ts string, full bool) ([]slack.ItemReaction, error)
GetClient() *slack.Client
GetAppUserID() string
}
type EventHandlerFunc ¶
type EventHandlerFunc func(context.Context, slackevents.EventsAPIInnerEvent)
type HandlerFactory ¶
type HandlerFactory interface {
MentionEventHandler() MentionEventHandler
}
type MentionEventHandler ¶
type MentionEventHandler func(ctx context.Context, event *slackevents.AppMentionEvent)
type Option ¶
func AppTokenOption ¶
type SocketClient ¶
type SocketClient interface {
Events() chan socketmode.Event
Debugf(format string, v ...interface{})
Run() error
Ack(req socketmode.Request, payload ...interface{})
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.