/szppi
スラッシュコマンド
.env
を置く$ docker compose up --build
ngrok http 8080
https://******.jp.ngrok.io/slack/events
を slash command の編集ページに貼り付ける
コマンドは以下の interface を実装した構造体を定義し、slashHandler.RegisterSubHandlers()
の引数に与えることで実装することが可能です。
例: commands/omikuji.go
type CommandExecutor interface {
Handle(slashCmd *slack.SlashCommand) error // コマンドの振る舞い
Name() string // コマンドの名前
}