Skip to content

mittwald/hutbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hutbot Slack Bot

The hutbot is a simple Slack bot that monitors messages in a channel and automatically replies in a thread if no one reacts or responds to the message within a configurable time period (by default 30 minutes). The bot reminds channel members that a message has gone unanswered. Users can adjust both the waiting time and the reminder message directly within the channel.

Step 1: Set Up the Slack App

  1. Create a New Slack App

    • Go to Slack API: Applications and click "Create New App".
    • Choose "From scratch" and give your app a name and select your workspace.
  2. Create an App-Level Token

    • Go back to your app's settings.
    • Navigate to "Basic Information".
    • Scroll down to "App-Level Tokens".
    • Click "Generate Token and Scopes".
    • Give it a name (e.g., default) and add the scope connections:write.
    • Click "Generate" and copy the token.
  3. Enable Socket Mode

    • Go to "Socket Mode".
    • Click on "Enable Socket Mode".
  4. Add Required Permissions

    • Navigate to "OAuth & Permissions" on the left sidebar.
    • Under "Scopes", add the following bot token scopes:
      • channels:history
      • channels:read
      • chat:write
      • reactions:read
      • im:history
      • im:read
      • im:write
      • mpim:history
      • mpim:read
      • mpim:write
      • groups:history
      • groups:read
      • team:read
      • users.read
      • commands
  5. Enable Event Subscriptions

    • Go to "Event Subscriptions".
    • Turn on "Enable Events".
    • Under "Subscribe to bot events", add:
      • message.channels
      • reaction_added
      • message.groups
      • message.im
      • message.mpim
  6. Install the App

    • Go to "Install App".
    • Click "Install App to Workspace" and authorize the app.
    • Copy the Bot User OAuth Token; you'll need it later.
  7. Run the App

export SLACK_BOT_TOKEN='xoxb-your-bot-token'
export SLACK_APP_TOKEN='xapp-your-app-level-token'
pip install -r requirements.txt
python bot.py
  1. Invite Bot
/invite @Hutbot

Releases

No releases published

Packages

No packages published

Languages