Discord机器人已连接到WebSocket,但尚未完成加载。

huangapple go评论76阅读模式
英文:

Discord Bot connected to Websocket but not finished loading

问题

我正在开发一个类似于Discord机器人的项目,已经进行了2周的时间,一直没有出现问题...
但是现在,当我尝试启动机器人时,只显示如下内容:

1314 [主线程] 信息 net.dv8tion.jda.api.sharding.ShardManager - 登录成功!

2326 [JDA [0 / 1] MainWS-ReadThread] 信息 net.dv8tion.jda.internal.requests.WebSocketClient - 已连接到WebSocket

通常还会有至少一行类似于“加载完成”的内容,但现在这个信息不再显示了... 但我不知道为什么。

机器人已经在线,但是没有任何功能可用(命令等)。

英文:

I am working on a discord bot like for 2 weeks and all the time there were no problems...
but now when i was starting the bot, there is just standing this:

1314 [main] INFO net.dv8tion.jda.api.sharding.ShardManager - Login Successful!

2326 [JDA [0 / 1] MainWS-ReadThread] INFO net.dv8tion.jda.internal.requests.WebSocketClient - Connected to WebSocket

but normally there is at least one more line with something like "finished loading" and this is not there anymore... but i dont know why

The Bot is online but nothin works (commands, etc.)

答案1

得分: 2

new JDABuilder() 构造函数已被 JDA 弃用。

因此,您需要使用 createDefault()createLight()create() 方法来代替 new JDABuilder()

英文:

The new JDABuilder() constructor has deprecated by JDA.

So you need to use createDefault(), createLight(), or create() methods instead of new JDABuilder().

答案2

得分: 0

正如Fasmos所说,您需要使用JDA = JDABuilder.createDefault("YOUR TOKEN").build();而不是new JDABuilder,只需添加令牌,无需其他任何内容 Discord机器人已连接到WebSocket,但尚未完成加载。

英文:

As Fasmos said, You will need to use JDA = JDABuilder.createDefault("YOUR TOKEN").build(); Instead of new JDABuilder, Just adding that you must add the token, nothing else Discord机器人已连接到WebSocket,但尚未完成加载。

huangapple
  • 本文由 发表于 2020年10月28日 04:17:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/64562258.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定