mirror of
https://github.com/System-End/nephthys.git
synced 2026-04-19 22:05:12 +00:00
don't add bot as a helper
This commit is contained in:
parent
677c74935e
commit
eeee4063c1
1 changed files with 8 additions and 0 deletions
|
|
@ -7,6 +7,14 @@ async def update_helpers():
|
|||
res = await env.slack_client.conversations_members(channel=env.slack_bts_channel)
|
||||
team_ids = res.get("members", [])
|
||||
|
||||
# Get bot user ID to exclude from helpers
|
||||
bot_info = await env.slack_client.auth_test()
|
||||
bot_user_id = bot_info.get("user_id")
|
||||
|
||||
# Filter out bot user from team_ids
|
||||
if bot_user_id and bot_user_id in team_ids:
|
||||
team_ids = [user_id for user_id in team_ids if user_id != bot_user_id]
|
||||
|
||||
if not team_ids:
|
||||
# if this happens then something concerning has happened :p
|
||||
await env.slack_client.chat_postMessage(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue