aboutsummaryrefslogtreecommitdiff
path: root/src/botnet.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/botnet.py')
-rw-r--r--src/botnet.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/botnet.py b/src/botnet.py
index 225f7e9..c9c6fee 100644
--- a/src/botnet.py
+++ b/src/botnet.py
@@ -76,7 +76,7 @@ async def deploy_message(user_id: str, message: str):
}
daily_count = await get_daily_user_deployment_count(user_id)
- if daily_count >= DAILY_LIMIT and user_id not in ["U0AKCBZHHMH"]:
+ if daily_count >= DAILY_LIMIT:
return {
"success": False,
"error": f"You've reached your daily limit of {DAILY_LIMIT} messages!"
@@ -122,12 +122,12 @@ async def execute_deployment(deployment_id: int):
for user in users:
try:
client = AsyncWebClient(token=user["oauth_token"])
- channel = await get_random_channel(user["oauth_token"])
+ channel = await get_random_channel(user["oauth_token"], user["slack_id"])
if not channel:
print(f"No channels found for {user['slack_id']}, using #botnet")
channel_id = "C0BGMV1CAQG"
else:
- channel_id = channel["id"]
+ channel_id = channel
response = await client.chat_postMessage(
channel=channel_id, # put it in #botnet for now, make it detect recent thread with CM approval yada yada later
text=message,