2026-04-26 13:34:59 -07:00
2026-04-26 11:35:59 -07:00
2026-04-26 13:34:59 -07:00
2026-04-26 09:18:58 -07:00
2026-04-26 13:34:59 -07:00
2026-04-26 12:20:39 -07:00

DeepSeek Slack Bot

A Slack chatbot that forwards mentions to the DeepSeek API and posts the response back in-thread.

Slack App Setup

Required Bot Token Scopes

Scope Purpose
app_mentions:read Receive app_mention events
chat:write Post messages
reactions:write Add/remove emoji reactions
files:write Upload long responses as file snippets

Event Subscriptions

Subscribe to the app_mention bot event under Event Subscriptions.

Socket Mode

Enable Socket Mode in your app settings and generate an app-level token with the connections:write scope. This token starts with xapp-.

Environment Variables

Variable Description
SLACK_BOT_TOKEN Bot user OAuth token (xoxb-...)
SLACK_APP_TOKEN App-level token for Socket Mode (xapp-...)
DEEPSEEK_API_KEY DeepSeek API key

Copy .env.example to .env and fill in your values. The .env file is git-ignored.

The bot exits immediately with an error if any of these are missing.

Running

cp .env.example .env
# Edit .env with your real tokens

docker compose up -d

To view logs:

docker compose logs -f

To stop:

docker compose down

Without Docker

pip install -r requirements.txt

export SLACK_BOT_TOKEN="xoxb-..."
export SLACK_APP_TOKEN="xapp-..."
export DEEPSEEK_API_KEY="sk-..."

python bot.py

Behavior

  • Mention @deepseek in any channel the bot is in (or any public channel if scoped accordingly).
  • The bot reacts with 👀 while processing, then replies in-thread.
  • Responses over 2800 characters are uploaded as a text file instead of posted inline.
  • Empty mentions (just @deepseek with no text) get a nudge to include a prompt.
  • API errors produce an reaction and an error message in-thread.
Description
No description provided
Readme 58 KiB
Languages
Python 96.8%
Dockerfile 3.2%