pingbot

command module
v0.0.0-...-1498b6a Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: MIT Imports: 11 Imported by: 0

README

pingbot

pingbot demo for using github.com/shomali11/slacker package

Creating App in Slack

  • Create app by going to https://api.slack.com/apps createApp

  • Turn on socket mode.

    This will automatically create an app token will only see the token once, so save the token in a safe place like lastpass. socketMode

  • Enable Event Subscriptions

    Add the app_mention and message.im events eventSubscription

  • Add Oauth Scopes

    Go to Oauth & Permissions>Scopes scopes

  • Install App to Workspace installApp1

    installApp2

  • Grab the Bot User OAuth Token

  • Allow direct messages to bot

    Go to App Home and scroll down to Show Tabs and check the box allowing direct messages

    directMessages

Running the App locally

Set set env vars for the slack bot and app tokens

$ export SLACK_BOT_TOKEN=<YOUR_BOT_TOKEN>
$ export SLACK_APP_TOKEN=<YOUR_APP_TOKEN>

Run the pingbot

$ go run main.go
Connecting to Slack with Socket Mode.
Connected to Slack with Socket Mode.
Connected as App ID A02QYSEJ6HJ

Talking to ping bot

pingCmd

helmCmd

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