Fix: Audits with fake contexts crash whenever a command uses GUILD_OWNER

master
Pingex aka Raphaël 9 years ago
parent 65d5972fa5
commit 00d4961819

@ -47,7 +47,7 @@ public class DefaultPermissionOption implements ICommandOption
/**
* Only the guild owner is allowed to run the command.
*/
GUILD_OWNER(context -> !context.getChannel().isPrivate() && context.getUser().getID().equals(context.getChannel().getGuild().getOwnerID())),
GUILD_OWNER(context -> context.getGuild() != null && context.getUser().getID().equals(context.getGuild().getOwnerID())),
/**
* Only the bot owner is allowed to run the command.