Spaces:
Running
Running
Update join.py
Browse files24 unmodified lines252627282930282 unmodified lines31331431531631731831919 unmodified lines33934034134234334434524 unmodified linesBASE_URL = "https://desk-api.channel.io/desk/channels/240996"API_URL = "https://api.channel.works/desk/channels/240996"TARGET_GROUP_CHAT_ID = "574628"WEBSOCKET_URL = "wss://desk-ws.channel.io/socket.io/?platform=web&EIO=4&transport=websocket"# 環境変数の確認282 unmodified linesstats["messages_received"] += 1if chat_type == "group" and chat_id == TARGET_GROUP_CHAT_ID:print(f"対象グループのメッセージ: '{message_text[:100]}' from {manager_name}")# ここで受信メッセージに対する処理を実装else:19 unmodified linesf"personId={person_id}, personType={person_type}")if action == "join":if chat_id == TARGET_GROUP_CHAT_ID:print(f"ユーザーが対象グループに参加しました: personId={person_id}")else:print(f"ユーザーがグループに参加: chatId={chat_id}, personId={person_id}")24 unmodified lines25262728293031282 unmodified lines31431531631731831932019 unmodified lines34034134234334434534624 unmodified linesBASE_URL = "https://desk-api.channel.io/desk/channels/240996"API_URL = "https://api.channel.works/desk/channels/240996"TARGET_GROUP_CHAT_ID = "574628"TARGET_GROUP_CHAT_ID2 = "574317"WEBSOCKET_URL = "wss://desk-ws.channel.io/socket.io/?platform=web&EIO=4&transport=websocket"# 環境変数の確認282 unmodified linesstats["messages_received"] += 1if chat_type == "group" and chat_id == TARGET_GROUP_CHAT_ID2:print(f"対象グループのメッセージ: '{message_text[:100]}' from {manager_name}")# ここで受信メッセージに対する処理を実装else:19 unmodified linesf"personId={person_id}, personType={person_type}")if action == "join":if chat_id == TARGET_GROUP_CHAT_ID2:print(f"ユーザーが対象グループに参加しました: personId={person_id}")else:print(f"ユーザーがグループに参加: chatId={chat_id}, personId={person_id}")
join.py+3-2