Class PermissionHandler

java.lang.Object
com.reign.kat.lib.PermissionHandler

public class PermissionHandler extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.