【发布时间】:2021-04-19 16:47:21
【问题描述】:
所以,我正在创建一个不和谐的机器人,昨天它刚刚停止运行。所以我在看这里,有人说要处理错误。有了这个所以我试了一下。
bot.on('error', (e) => console.error(e));
bot.on('warning', (e) => console.warn(e));
bot.on('debug', (e) => console.info(e));
现在我明白了
Preparing to connect to the gateway...
[WS => Manager] Fetched Gateway Information
URL: wss://gateway.discord.gg
Recommended Shards: 1
[WS => Manager] Session Limit Information
Total: 1000
Remaining: 1000
[WS => Manager] Spawning shards: 0
[WS => Shard 0] [CONNECT]
Gateway : wss://gateway.discord.gg/
Version : 6
Encoding : json
Compression: none
[WS => Shard 0] Setting a HELLO timeout for 20s.
[WS => Shard 0] [CLOSE]
Event Code: 1006
Clean : false
Reason : No reason received
[WS => Shard 0] Clearing the HELLO timeout.
[WS => Shard 0] WS State: CLOSED
[WS => Shard 0] Failed to connect to the gateway, requeueing...
[WS => Manager] Shard Queue Size: 1; continuing in 5 seconds...
[WS => Manager] Session Limit Information
Total: 1000
Remaining: 1000
[WS => Shard 0] [CONNECT]
Gateway : wss://gateway.discord.gg/
Version : 6
Encoding : json
Compression: none
[WS => Shard 0] Setting a HELLO timeout for 20s.
[WS => Shard 0] [CLOSE]
Event Code: 1006
Clean : false
Reason : No reason received
[WS => Shard 0] Clearing the HELLO timeout.
[WS => Shard 0] WS State: CLOSED
[WS => Shard 0] Failed to connect to the gateway, requeueing...
[WS => Manager] Shard Queue Size: 1; continuing in 5 seconds...
在我的终端中,机器人仍然没有运行。 有人可以帮我吗?
【问题讨论】:
-
你的机器人代码是什么,请提供更多详细信息
标签: javascript discord.js