Fix NPE during reload with invalid discord bot tokens (#4417)

This commit is contained in:
triagonal 2021-08-01 00:19:20 +10:00 committed by GitHub
parent 17e026f9aa
commit 90828965df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -140,6 +140,7 @@ public class JDADiscordService implements DiscordService {
logger.log(Level.INFO, tl("discordLoggingIn"));
if (plugin.getSettings().getBotToken().replace("INSERT-TOKEN-HERE", "").trim().isEmpty()) {
invalidStartup = true;
throw new IllegalArgumentException(tl("discordErrorNoToken"));
}