Package com.reign.kat.lib
Class PermissionHandler
java.lang.Object
com.reign.kat.lib.PermissionHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isPrivileged
(net.dv8tion.jda.api.entities.Member member, net.dv8tion.jda.api.entities.channel.middleman.GuildChannel channel, long discordPerms, PermissionGroupType cmdPerm) Ensures the member has sufficient command permissions and discord permission to execute the command in the requested channel.
-
Constructor Details
-
PermissionHandler
public PermissionHandler()
-
-
Method Details
-
isPrivileged
public static boolean isPrivileged(net.dv8tion.jda.api.entities.Member member, net.dv8tion.jda.api.entities.channel.middleman.GuildChannel channel, long discordPerms, PermissionGroupType cmdPerm) Ensures the member has sufficient command permissions and discord permission to execute the command in the requested channel.- Parameters:
member
- The member to check permissions for.channel
- The channel to check permission to execute in.discordPerms
- The raw discord permission requirements.cmdPerm
- The command permission group required.- Returns:
- boolean if they can execute or not.
-