Add Discord + Slack integration: read, reply, list channels#36
Open
brando90 wants to merge 2 commits into
Open
Add Discord + Slack integration: read, reply, list channels#36brando90 wants to merge 2 commits into
brando90 wants to merge 2 commits into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
discord_uu.pybot 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 optionalrun_listener_bot()via discord.pyslack_uu.pymodule: 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(), andsend_slack_block_message()for Block Kitpython -m uutils.discord_uu --help/python -m uutils.slack_uu --help~/keys/— never hardcoded:~/keys/discord_bot_token.txt(orDISCORD_BOT_TOKENenv var)~/keys/slack_bot_token.txt(orSLACK_BOT_TOKENenv var)~/keys/discord_webhook_url.txt/~/keys/slack_webhook_url.txtrequests(already in pyproject.toml)discord.py>=2.0to pyproject.toml (only needed for optionalrun_listener_bot())Test plan
python -m uutils.discord_uu --smoke-testpasses (dry-run, no credentials needed)python -m uutils.slack_uu --smoke-testpasses (dry-run, no credentials needed)~/keys/discord_bot_token.txt, test--list-guilds,--read,--send,--reply~/keys/slack_bot_token.txt, test--list-channels,--read,--send,--reply--read-thread, reactions with--react, file upload with--uploadhttps://claude.ai/code/session_01PXUDf4PqfogV7orbpzZFuF