check if the guild is valid before getting it
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 35s

This commit is contained in:
Lee 2024-06-27 21:34:31 +01:00
parent f0cc859585
commit 63fbe27754

@ -59,6 +59,9 @@ public class GuildService extends ListenerAdapter {
if (guilds.containsKey(id)) {
return guilds.get(id);
}
if (DiscordService.JDA.getGuildById(id) == null) {
return null;
}
long start = System.currentTimeMillis();
Optional<BatGuild> optionalGuild = guildRepository.findById(id);