Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
108 views
in Technique[技术] by (71.8m points)

java - Discord Bot connected to Websocket but not finished loading

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.)

question from:https://stackoverflow.com/questions/65922326/discord-bot-only-works-in-private-messages

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The new JDABuilder() constructor has deprecated by JDA.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...