aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArslaan Pathan <[email protected]>2026-07-17 00:12:01 +1200
committerArslaan Pathan <[email protected]>2026-07-17 00:12:01 +1200
commit5f92e6d65bcb3c440153f889dab7339290f57286 (patch)
tree2857286c2b33802f92b78f321dbb38fbcdd4dbee
parent2eb0e1197b40c07de4a57701504f77345d77dc36 (diff)
downloadslack-botnet-5f92e6d65bcb3c440153f889dab7339290f57286.tar.xz
slack-botnet-5f92e6d65bcb3c440153f889dab7339290f57286.zip
QUICK OAUTH
-rw-r--r--example.env3
-rw-r--r--src/main.py4
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 <message>*: sends a message into the deploy queue for review/voting\n*botnet approve <channel>*: approve Botnet to function in a channel (must be CM)\n*botnet revoke <channel>*: 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 <message>*: sends a message into the deploy queue for review/voting\n*botnet approve <channel>*: approve Botnet to function in a channel (must be CM)\n*botnet revoke <channel>*: 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: