Closed LouisDerEchte closed 5 months ago
Hi, this is not caused because something in internal of JDA is broken, but rather because you are using the /reload
command. Which should not be used.
However, to fix this you need add this to your onDisable
in the class that extends JavaPlugin
:
jda.shutdown();
// Allow at most 10 seconds for remaining requests to finish
if (!jda.awaitShutdown(Duration.ofSeconds(10))) {
jda.shutdownNow(); // Cancel all remaining requests
jda.awaitShutdown(); // Wait until shutdown is complete (indefinitely)
}
Thank you for the fast response! I don't think that it was caused bc of reloading since I was restarting the server. However I appreciate your help.
Closing as duplicate https://github.com/discord-jda/JDA/issues?q=is%3Aissue+is%3Aclosed+zip+file+closed
General Troubleshooting
Version of JDA
5.0.0-beta.21
Expected Behaviour
I don't really know what this error is supposed to be but I think it wasn't my fault since my name doesn't occur in the error
Code Example for Reproduction Steps
Code for JDABuilder or DefaultShardManagerBuilder used
Exception or Error