diff --git a/src/main/java/cc/fascinated/bat/service/DiscordMessageService.java b/src/main/java/cc/fascinated/bat/service/DiscordMessageService.java index 43f5c41..d9ce0e6 100644 --- a/src/main/java/cc/fascinated/bat/service/DiscordMessageService.java +++ b/src/main/java/cc/fascinated/bat/service/DiscordMessageService.java @@ -86,6 +86,9 @@ public class DiscordMessageService extends ListenerAdapter { BatGuild guild = guildService.getGuild(event.getGuild().getId()); BatUser user = userService.getUser(event.getAuthor().getId()); + if (guild == null || user == null) { + return; + } for (EventListener listener : EventService.LISTENERS) { listener.onGuildMessageEdit(guild, user, oldMessage, newMessage, event); }