forked from Fascinated/Bat
check if the guild is valid before getting it
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