Skip to content

Add Discord + Slack integration: read, reply, list channels#36

Open
brando90 wants to merge 2 commits into
masterfrom
claude/discord-integration-MT8Ja
Open

Add Discord + Slack integration: read, reply, list channels#36
brando90 wants to merge 2 commits into
masterfrom
claude/discord-integration-MT8Ja

Conversation

@brando90
Copy link
Copy Markdown
Owner

@brando90 brando90 commented Apr 15, 2026

Summary

  • New discord_uu.py bot functions: Extends from webhook-only (send) to full Discord Bot support using the REST API with bot token auth. Functions: list_bot_guilds(), list_channels(), read_messages(), send_bot_message(), reply_to_message(), plus optional run_listener_bot() via discord.py
  • New slack_uu.py module: Full Slack integration following the same pattern. Webhook functions for one-way sends, plus Slack Web API bot functions: list_channels(), read_messages(), read_thread(), send_bot_message(), reply_to_message(), add_reaction(), upload_file(), and send_slack_block_message() for Block Kit
  • CLI entry points for both: python -m uutils.discord_uu --help / python -m uutils.slack_uu --help
  • Credentials read from ~/keys/ — never hardcoded:
    • Discord: ~/keys/discord_bot_token.txt (or DISCORD_BOT_TOKEN env var)
    • Slack: ~/keys/slack_bot_token.txt (or SLACK_BOT_TOKEN env var)
    • Webhooks: ~/keys/discord_webhook_url.txt / ~/keys/slack_webhook_url.txt
  • No new dependencies for Slack — uses requests (already in pyproject.toml)
  • Added discord.py>=2.0 to pyproject.toml (only needed for optional run_listener_bot())
  • Full setup instructions in both module docstrings

Test plan

  • python -m uutils.discord_uu --smoke-test passes (dry-run, no credentials needed)
  • python -m uutils.slack_uu --smoke-test passes (dry-run, no credentials needed)
  • Discord: Create bot, save token to ~/keys/discord_bot_token.txt, test --list-guilds, --read, --send, --reply
  • Slack: Create app, save token to ~/keys/slack_bot_token.txt, test --list-channels, --read, --send, --reply
  • Slack: Test thread reading with --read-thread, reactions with --react, file upload with --upload

https://claude.ai/code/session_01PXUDf4PqfogV7orbpzZFuF

claude added 2 commits April 15, 2026 01:52
…REST API

Extends discord_uu.py from webhook-only (send) to full bot support (read, reply,
list guilds/channels) using Discord's REST API with bot token auth. Adds CLI
entry point with argparse, event-driven listener via discord.py, and complete
setup instructions for creating and inviting a Discord bot.

https://claude.ai/code/session_01PXUDf4PqfogV7orbpzZFuF
New slack_uu.py module following the same pattern as discord_uu.py.
Webhook functions for one-way sends, plus full Slack Web API bot functions
for reading messages, replying in threads, listing channels, adding reactions,
and uploading files. Credentials read from ~/keys/slack_bot_token.txt.
No new dependencies -- uses requests (already in pyproject.toml).

https://claude.ai/code/session_01PXUDf4PqfogV7orbpzZFuF
@brando90 brando90 changed the title Add Discord bot integration: read, reply, list channels Add Discord + Slack integration: read, reply, list channels Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants