check if the guild is valid before getting it
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 35s
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 35s
This commit is contained in:
parent
f0cc859585
commit
63fbe27754
@ -59,6 +59,9 @@ public class GuildService extends ListenerAdapter {
|
|||||||
if (guilds.containsKey(id)) {
|
if (guilds.containsKey(id)) {
|
||||||
return guilds.get(id);
|
return guilds.get(id);
|
||||||
}
|
}
|
||||||
|
if (DiscordService.JDA.getGuildById(id) == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
Optional<BatGuild> optionalGuild = guildRepository.findById(id);
|
Optional<BatGuild> optionalGuild = guildRepository.findById(id);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user