Documentation
¶
Index ¶
- func NewApp(config AppConfig) (spanner.App, error)
- func NewCustomEvent(body map[string]interface{}) spanner.CustomEvent
- type AppConfig
- type BlockState
- type Blocks
- func (b *Blocks) Button(label string) bool
- func (b *Blocks) Divider()
- func (b *Blocks) Header(message string)
- func (b *Blocks) Markdown(text string)
- func (b *Blocks) MultilineTextInput(label, hint, placeholder string) string
- func (b *Blocks) MultipleSelect(title string, options []spanner.Option) []string
- func (b *Blocks) PlainText(text string)
- func (b *Blocks) Select(title string, options []spanner.Option) string
- func (b *Blocks) TextInput(label, hint, placeholder string) string
- type MessageSender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewApp ¶
NewApp creates a new slack app.
botToken is the token for the bot user, with prefix 'xoxb-' appToken is the token for the app, with prefix 'xapp-'
Slack apps use socket mode to handle events, so the app will need to be configured to use socket mode. https://api.slack.com/apis/connections/socket
As at November 2023, this means that these apps cannot be distributed in the public Slack app directory.
func NewCustomEvent ¶
func NewCustomEvent(body map[string]interface{}) spanner.CustomEvent
Types ¶
type AppConfig ¶ added in v0.1.2
type AppConfig struct { BotToken string AppToken string Debug bool // AckOnError acknowledges messages when there is an error performing actions to prevent // Slack from sending a retry. This will avoid actions being duplicated. AckOnError bool EventInterceptor spanner.EventInterceptor HandlerInterceptor spanner.HandlerInterceptor ActionInterceptor spanner.ActionInterceptor FinishInterceptor spanner.FinishInterceptor }
type BlockState ¶
type Blocks ¶
type Blocks struct { BlockStates map[string]BlockState `json:"block_state,omitempty"` // contains filtered or unexported fields }
func (*Blocks) MultilineTextInput ¶
func (*Blocks) MultipleSelect ¶
type MessageSender ¶
type MessageSender struct { Messages []*message `json:"messages"` EventDepth int `json:"event_depth"` // contains filtered or unexported fields }
func (*MessageSender) SendMessage ¶
func (m *MessageSender) SendMessage(channelID string) spanner.Message
Click to show internal directories.
Click to hide internal directories.