MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / main

Function main

scripts/get_chat_ids.py:119–144  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

117 print("🔍 Chat ID Finder - 飞书对话框 ID 获取工具")
118 print("="*60)
119 print()
120 print("使用步骤:")
121 print("1. 保持此脚本运行")
122 print("2. 在飞书开放平台将事件订阅 URL 临时改为:http://localhost:9999")
123 print(" 或者使用 ngrok:ngrok http 9999,然后将 ngrok URL 配置到飞书")
124 print("3. 在飞书上给 PaperFlow Bot 发送任意消息")
125 print("4. 此脚本会打印出 chat_id")
126 print("5. 将 chat_id 复制到 data/roles.json 中对应角色的 feishu_chat_id 字段")
127 print()
128 print("按 Ctrl+C 停止")
129 print("="*60)
130 print()
131
132 server = HTTPServer(('', port), ChatIdFinderHandler)
133 logger.info(f"Starting chat_id finder server on port {port}")
134
135 try:
136 server.serve_forever()
137 except KeyboardInterrupt:
138 print("\n\nStopped.")
139 server.shutdown()
140
141
142if __name__ == "__main__":
143 main()

Callers 1

get_chat_ids.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected