discord-jda / JDA

Java wrapper for the popular chat & VOIP service: Discord https://discord.com
Apache License 2.0
4.35k stars 734 forks source link

"Was shutdown trying to await status" #1994

Closed stefan-reich closed 2 years ago

stefan-reich commented 2 years ago

[x] I have checked for similar issues. [ ] I have updated to the latest JDA version - will do if necessary but I'd love to get a bit of feedback first. I'm using JDA 4.2 [x] I have checked the branches or the maintainers' PRs for upcoming bug fixes.

Bug Report

Audio bot doesn't start anymore. Is there a recent change in Discord I am not aware of? The running bot actually got disconnected too.

Expected Behavior

Bot starts

Code Example or Reproduction Steps

JDABuilder builder = JDABuilder.create(token,
    GUILD_VOICE_STATES, GUILD_MESSAGES, GUILD_MESSAGE_REACTIONS, DIRECT_MESSAGES);
  builder.addEventListeners(...);
  JDA jda = builder.build();
  jda.awaitReady();

Code for JDABuilder or DefaultShardManagerBuilder Used

See above

Exception or Error

java.lang.IllegalStateException: Was shutdown trying to await status at net.dv8tion.jda.internal.JDAImpl.awaitStatus(JDAImpl.java:469) at net.dv8tion.jda.api.JDA.awaitStatus(JDA.java:310) at net.dv8tion.jda.api.JDA.awaitReady(JDA.java:360) at main.discordBot40(main.java:17470) at main$DynDiscordHopper.startDiscord(main.java:10287) at main$DynDiscordHopper.startMe(main.java:10799) at main$DynServerAwareDiscordBot.startMe(main.java:10020) at main$DynDiscordHopper$5.run(main.java:10749) at main$43.run(main.java:12370) at java.base/java.lang.Thread.run(Thread.java:832)

MinnDevelopment commented 2 years ago

Please include the entire log, not just the last part. The exception here is only the consequence of a previous error which you omitted.

stefan-reich commented 2 years ago

Hmm. Where should that error have occurred? I posted the whole code above (except for the listener - can it be in there?).

Edit: Oh, I see, it's probably in System.out/System.err? Will check. Sorry

stefan-reich commented 2 years ago

OK I got it. It said too many guilds, I'm required to shard. Thank you and sorry for bothering