taskuji-slackbot-socketmode

command module
v0.0.0-...-89f4114 Latest Latest
Warning

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

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

README

taskuji-slackbot-socketmode

Mention to bot, bot select user randomly in the channel.
Typical usage is when asking someone for a task.
It uses Socket Mode screenshot

Usage in Slack

Mention bot user name then bot select 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 select a member randomly again.

Preparation in Slack

  • Create Slack App as internal integrations
  • Turn on Bots
  • Turn on Socket Mode
  • Turn on Interactivity
  • Turn on Event Subscriptions
    • Add Subscribe to bot events : app_mention
  • Add Permissions
    • channels:read
    • chat:write
  • Invite bot user to your channel.

Run

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

export APP_LEVEL_TOKEN="xapp-***"      // you can get this after turn on socketmode (via slack app management console)
export BOT_TOKEN="xoxb-***"      // you can get this after create a bot user (via slack app management console)

To run this,

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

Appedix

Reference:

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