diff --git a/command/src/main/java/com/jagrosh/jdautilities/command/SlashCommand.java b/command/src/main/java/com/jagrosh/jdautilities/command/SlashCommand.java index e0e4a56e..74b96280 100644 --- a/command/src/main/java/com/jagrosh/jdautilities/command/SlashCommand.java +++ b/command/src/main/java/com/jagrosh/jdautilities/command/SlashCommand.java @@ -251,6 +251,10 @@ public final void run(SlashCommandEvent event, CommandClient client) //user perms for(Permission p: userPermissions) { + // Member will never be null because this is only ran in a server (text channel) + if(event.getMember() == null) + continue; + if(p.isChannel()) { if(!event.getMember().hasPermission(event.getTextChannel(), p)) @@ -272,6 +276,12 @@ public final void run(SlashCommandEvent event, CommandClient client) // bot perms for(Permission p: botPermissions) { + // We can ignore this permission because bots can reply with embeds even without either of these perms. + // The only thing stopping them is the user's ability to use Application Commands. + // It's extremely dumb, but what more can you do. + if (p == Permission.VIEW_CHANNEL || p == Permission.MESSAGE_EMBED_LINKS) + continue; + Member selfMember = event.getGuild() == null ? null : event.getGuild().getSelfMember(); if(p.isChannel()) {