nonebot / adapter-feishu

NoneBot2 飞书适配器 / FeiShu (LarkSuite) adapter for nonebot2
https://feishu.adapters.nonebot.dev
MIT License
29 stars 7 forks source link

Bug: 配置事件订阅出现问题 #101

Closed hz3271 closed 7 months ago

hz3271 commented 7 months ago

操作系统

Windows

Python 版本

3.10

NoneBot 版本

2.0

飞书适配器版本

2.5.0

描述问题

无法配置事件订阅http://127.0.0.1:8888/feishu/cli_a*** 是我哪里漏了吗

复现步骤

(feishubot) PS D:\feishubot\feishu_bot> nb run 使用 Python: D:\feishubot\feishu_bot.venv\Scripts\python.exe 04-15 14:42:56 [SUCCESS] nonebot | NoneBot is initializing... 04-15 14:42:56 [INFO] nonebot | Current Env: dev 04-15 14:42:56 [DEBUG] nonebot | Loaded Config: {'driver': '~fastapi+~httpx', 'host': IPv4Address('127.0.0.1'), 'port': 8888, 'log_level': 'DEBUG', 'api_timeout': 30 .0, 'superusers': set(), 'nickname': set(), 'command_start': {'/'}, 'command_sep': {'.'}, 'session_expire_timeout': datetime.timedelta(seconds=120), 'feishu_bots': [ {'app_id': 'cli_a打码', 'app_secret': 'E1ycY打码', 'verification_token': 'z17打码', 'is_lark': False}], 'e nvironment': 'dev'} 04-15 14:42:56 [DEBUG] nonebot | Succeeded to load adapter "Feishu" 04-15 14:42:56 [SUCCESS] nonebot | Running NoneBot... 04-15 14:42:56 [DEBUG] nonebot | Loaded adapters: Feishu 04-15 14:42:56 [INFO] uvicorn | Started server process [61640] 04-15 14:42:56 [INFO] uvicorn | Waiting for application startup. 04-15 14:42:57 [INFO] nonebot | FEISHU | Bot cli_a5打码 connected 04-15 14:42:57 [INFO] uvicorn | Application startup complete. 04-15 14:42:57 [INFO] uvicorn | Uvicorn running on http://127.0.0.1:8888 (Press CTRL+C to quit)

期望的结果

No response

截图或日志

image

chung1912 commented 7 months ago

你的飞书机器人是在自己本地服务器部署的?不太可能是127.0.0.1吧

StarHeartHunt commented 7 months ago

这里的地址必须是外网可访问的,因为是飞书那边的服务器来调接口推送事件数据。如果没有公网 IP,你可以用 ngrok 之类的内网穿透服务。