引用discordphp,给Hyperf配置一个启动discord机器人任务,php bin/hyperf.php discord:run执行出现异常 #7072
zengdongxu111
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
异常状况为:
2024-09-13T16:23:10.454607+08:00] DiSCOrdPHP.WARNING: REO GET oauth2/applications/@mefailed: connection to tls://discord.com:443 timed out after 60 seconds (ETTMEDOUT) I
2024-09-13T16:23:10.454751+08:00] DiscordPHP,DEBuG: http not checking f"waiting":1,"emoty":true}[2024-09-13T16:23:10.455641+08:001 DiSCOrdPHP,WARNING: RE0 GET gateway/bot failed: connection to tls://discord,com:443 timed out after 60 seconds (ETIMEDOUT) TI T?
2024-09-13T16:23:10,455688+08:00] DiscordPHP,DEBuG: http not checking f"waiting":0,"empty":truel2024-09-13T16:23:10.455758+08:00] DiscordPHP.WARNING: could not retrieve gateway, usina default
2024-09-13T16:23:10.455868+08:00] DiscordPHP,INF0: gateway retrieved and set {"gateway:"wss://gateway,discord,gg/?v=9&encoding=ison" ,"session":f"total":1000,"remaining":10e0,"reset after":0,"max concurrency":1}}2024-09-13T16:23:10.455915+08:00] DiscordPHP.INF0: starting connection to websocket {'gateway":"wss://gateway.discord.gg/?v=9&encoding=json"} []。之后尝试将$discord->run();注释,发现就可以启动,discord机器人中就可以按照指令回复
。使用案例脚本又没有这个问题。询问AI回复是因为 Hyperf 和 ReactPHP(DiscordPHP 基于 ReactPHP)的事件循环机制之间存在不兼容的问题。那注释这段代码是否会影响?
Beta Was this translation helpful? Give feedback.
All reactions