qbtrade/pkg/interact/slack_callbacks.go
2024-06-27 22:42:38 +08:00

28 lines
643 B
Go

// Code generated by "callbackgen -type Slack"; DO NOT EDIT.
package interact
import (
"github.com/slack-go/slack/slackevents"
)
func (s *Slack) OnAuthorized(cb func(userSession *SlackSession)) {
s.authorizedCallbacks = append(s.authorizedCallbacks, cb)
}
func (s *Slack) EmitAuthorized(userSession *SlackSession) {
for _, cb := range s.authorizedCallbacks {
cb(userSession)
}
}
func (s *Slack) OnEventsApi(cb func(evt slackevents.EventsAPIEvent)) {
s.eventsApiCallbacks = append(s.eventsApiCallbacks, cb)
}
func (s *Slack) EmitEventsApi(evt slackevents.EventsAPIEvent) {
for _, cb := range s.eventsApiCallbacks {
cb(evt)
}
}