aboutsummaryrefslogtreecommitdiff
path: root/src/botnet.py
diff options
context:
space:
mode:
authorArslaan Pathan <[email protected]>2026-07-11 21:10:53 +1200
committerArslaan Pathan <[email protected]>2026-07-11 21:10:53 +1200
commite93169c11c848f78d0411031ae2589e9d5b1fde0 (patch)
treeed4ede257b0d7b5faad1461fe85f82ab34e546ce /src/botnet.py
parentce6bfe08e4545a98a3144d5903fedfa5814dd834 (diff)
downloadslack-botnet-e93169c11c848f78d0411031ae2589e9d5b1fde0.tar.xz
slack-botnet-e93169c11c848f78d0411031ae2589e9d5b1fde0.zip
Start working on voting
Diffstat (limited to 'src/botnet.py')
-rw-r--r--src/botnet.py69
1 files changed, 64 insertions, 5 deletions
diff --git a/src/botnet.py b/src/botnet.py
index fbf8efe..086d01f 100644
--- a/src/botnet.py
+++ b/src/botnet.py
@@ -13,9 +13,11 @@ selfbot_token = os.environ.get("SLACK_SELFBOT_OAUTH_XOXP")
gemini_key = os.environ.get("GEMINI_API_KEY")
system_prompt = """
-You are a strict content moderator for a professional Slack workspace called Hack Club.
+You are a strict content moderator for a botnet-like social experiment in a professional Slack workspace called Hack Club.
-Your job is to analyze messages and determine if they are SAFE or UNSAFE to be posted by a bot on behalf of multiple users.
+Your job is to analyze messages and determine if they are SAFE or UNSAFE to be posted by a bot on behalf of multiple users in the Slack.
+Messages will be posted on behalf of MANY USERS simultaneously.
+The message must make sense coming from ANYONE, not just the submitter.
A message is UNSAFE if it contains ANY of the following:
- Swear words, profanity, or offensive language
@@ -25,6 +27,13 @@ A message is UNSAFE if it contains ANY of the following:
- Spam, excessive gibberish, or repetitive messages
- Phishing, scams, or malicious links
- Mentions of illegal activities (hacking, drugs, violence, etc.)
+- Self-promotion, advertising, or promotional content
+- Links to personal websites, products, or services
+- Strong opinions or polarizing statements (politics, religion, software, licensing, etc.)
+- Tech flame wars (X is better than Y, Z sucks, etc.)
+- Negative statements about people, projects, or technologies
+- Complaints or rants about specific tools, languages, or frameworks
+- Anything that could be interpreted as speaking for others in a controversial way
- Anything that would make Slack admins (FD/Fire Dept.) upset or require them to intervene
A message is SAFE if it is:
@@ -81,13 +90,63 @@ async def deploy_message(user_id: str, message: str):
deployment_id = await create_deployment(user_id, message)
- print(f"DEBUG: Executing the deployment {deployment_id} on arrival - REMOVE THIS LATER!")
- await execute_deployment(deployment_id)
+ blocks = [
+ {
+ "type": "header",
+ "text": {
+ "type": "plain_text",
+ "text": f"Voting | Deployment #{deployment_id}"
+ }
+ },
+ {
+ "type": "section",
+ "text": {
+ "type": "mrkdwn",
+ "text": f"*Message:*\n> {message}"
+ }
+ },
+ {
+ "type": "section",
+ "text": {
+ "type": "mrkdwn",
+ "text": f"*Votes:*\n> Approve: 0\n> Reject: 0"
+ }
+ },
+ {
+ "type": "actions",
+ "elements": [
+ {
+ "type": "button",
+ "text": {"type": "plain_text", "text": "Approve ^_^"},
+ "style": "primary",
+ "action_id": f"vote_approve_{deployment_id}"
+ },
+ {
+ "type": "button",
+ "text": {"type": "plain_text", "text": "Reject T_T"},
+ "style": "danger",
+ "action_id": f"vote_reject_{deployment_id}"
+ }
+ ]
+ }
+ ]
+
+ client = AsyncWebClient(token=selfbot_token)
+ response = await client.chat_postMessage(
+ channel="C0BFEDTUFCP",
+ blocks=blocks,
+ text=f"Vote on Deployment #deployment_id"
+ )
+
+ message_ts = response["ts"]
+
+ # print(f"DEBUG: Executing the deployment {deployment_id} on arrival - REMOVE THIS LATER!")
+ # await execute_deployment(deployment_id)
return {
"success": True,
"deployment_id": deployment_id,
- "message": "Your message has been deployed!"
+ "message": "Your message has been submitted for voting!"
}
async def execute_deployment(deployment_id: int):