From 5f92e6d65bcb3c440153f889dab7339290f57286 Mon Sep 17 00:00:00 2001 From: Arslaan Pathan Date: Fri, 17 Jul 2026 00:12:01 +1200 Subject: QUICK OAUTH --- example.env | 3 ++- src/main.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/example.env b/example.env index b8458b8..9dff5ea 100644 --- a/example.env +++ b/example.env @@ -4,4 +4,5 @@ SELFBOT_USER_ID=UXXXXXXXXXX GEMINI_API_KEY=xxx-your-key-here SLAKC_CLIENT_ID=xxx-your-key-here SLAKC_CLIENT_SECRET=xxx-your-key-here -SLAKC_REDIRECT_URI=http://localhost:8000 +SLAKC_REDIRECT_URI=http://localhost:8000/slack/oauth/redirect +SLAKC_OAUTH_PREFIX=http://localhost:8000 diff --git a/src/main.py b/src/main.py index c2980a7..eeffa54 100644 --- a/src/main.py +++ b/src/main.py @@ -51,7 +51,7 @@ async def handle_messages(message, say): args = parts[2:] if command == "help": - await say("*Botnet Commands*:\n---\n*botnet help*: shows this message\n*botnet deploy *: sends a message into the deploy queue for review/voting\n*botnet approve *: approve Botnet to function in a channel (must be CM)\n*botnet revoke *: revoke approval for Botnet to unction in a channel (must be CM)", mrkdwn=True) + await say("*Botnet Commands*:\n---\n*botnet help*: shows this message\n*botnet deploy *: sends a message into the deploy queue for review/voting\n*botnet approve *: approve Botnet to function in a channel (must be CM)\n*botnet revoke *: revoke approval for Botnet to unction in a channel (must be CM)\n*botnet oauth*: sends you an OAuth link to join the botnet", mrkdwn=True) elif command == "deploy": if not args: await say("Please provide a message to deploy!") @@ -106,6 +106,8 @@ async def handle_messages(message, say): await revoke_channel_approval(channel_id) await say(f"T_T Channel {args[0].strip()} has been revoked approval for Botnet!") + elif command == "oauth": + await say(f"{os.environ.get('SLAKC_OAUTH_PREFIX')}/slack/oauth/install") else: await say(f"Unknown command: {command}") except Exception as e: -- cgit v1.2.3