taskuji-slackbot-event-subscribe

command module
v0.0.0-...-c4a0859 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2021 License: MIT Imports: 18 Imported by: 0

README

taskuji-slackbot-event-subscribe

Mention to bot, bot choose user randomly in the channel.
Typical usage is when asking someone for a task.

Implementatin is based on go-slack-interactive.

Usage in Slack

Mention bot user name then bot nominate a member in the channel randomly. Press OK button if the member can do the task, otherwise press NG buttton. When NG button is pressed, bot nominate a member randomly again. Usage

Preparation in Slack

  • Create Slack App as internal integrations
  • Turn on Bots
  • Turn on Interactivity and set Request URL : {scheme}://{host}/interaction
  • Turn on Event Subscriptions
    • Set Request URL : {scheme}://{host}/event
    • Add Subscribe to bot events : app_mention
  • Add Permissions
    • channels:read
    • chat:write
    • groups:read
    • incoming-webhook
  • Invite bot user to your channel.

Run

To run this bot, you need to set the following env vars,

export BOT_TOKEN="xoxb-***"      // you can get this after create a bot user (via slack app management console)
export VERIFICATION_TOKEN="***"  // you can get this after enable interactive message (via slack app management console)
export SIGNING_SECRET="***"  // you can get this after enable interactive message (via slack app management console)

To run this,

$ dep ensure
$ go build -o bot && ./bot

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL