Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Aristat/slack-bot

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slack Bot

Table of Contents

Overview

This is an example slack bot

Based on https://github.com/tcnksm/go-slack-interactive ("beer" logic) and simple poll

Package list

Packages which use in this example project

  1. slack - slack library
  2. wire - dependency Injection
  3. chi - HTTP router
  4. godotenv - load env variables from files
  5. logrus - logger
  6. cli - simple and fast CLI

Run bot

  1. Install golang, packages
  2. Add .env.development file with SLACK_TOKEN and SLACK_SIGNING_SECRET in repository
  3. Run
    go run main.go start
    
  4. Install ngrok
  5. Setup in api.slack.com/:
    1. Interactivity Request URL = https://#.ngrok.io/slack/interative-endpoint
    2. Slash Commands '/poll' = https://#.ngrok.io/slack/command
    3. OAuth & Permissions Redirect URLs = https://#.ngrok.io/slack/redirect
    4. Scopes channels:history, chat:write, commands, pins:read, pins:write
    5. Event Subscriptions Request URL = https://#.ngrok.io/slack/events
  6. Add bot to app
  7. Write give beer in a chat or run /poll command

About

Slack bot Golang

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.