Unable to use Discord API
Hello, recently all the the bots I have written for my server have stopped working. Two of them are written in Javacord and one in Discord JS. They all seem to take a long time when attempting to retrieve the API object.
new DiscordApiBuilder().setToken(token).login().join();
After about a minute or two this line will run and then my server shows up as an unavailableServer.

Could I be banned as a developer? I've tried regenerating my token for the bots to no avail. All my bots seemed to have randomly broken and I can figure out why.
The bots do show up as online. I'm just unable to retrieve the server because it's not available...

The following code will throw an exception because it fails to retrieve the server.
Optional<Server> oServer = api.getServerById(SERVER_ID);
if (!oServer.isPresent()) throw new RuntimeException("Unable to find server.");
server = oServer.get();
Any help is much appreciated!
Thanks for reading.
0
Accedi per aggiungere un commento.
Commenti
0 commenti