Class TemplateChannel.PermissionOverride

    • Constructor Detail

      • PermissionOverride

        public PermissionOverride​(long id,
                                  long allow,
                                  long deny)
    • Method Detail

      • getAllowedRaw

        public long getAllowedRaw()
        This is the raw binary representation (as a base 10 long) of the permissions allowed by this override.
        The long relates to the offsets used by each Permission.
        Returns:
        Never-negative long containing the binary representation of the allowed permissions of this override.
      • getInheritRaw

        public long getInheritRaw()
        This is the raw binary representation (as a base 10 long) of the permissions not affected by this override.
        The long relates to the offsets used by each Permission.
        Returns:
        Never-negative long containing the binary representation of the unaffected permissions of this override.
      • getDeniedRaw

        public long getDeniedRaw()
        This is the raw binary representation (as a base 10 long) of the permissions denied by this override.
        The long relates to the offsets used by each Permission.
        Returns:
        Never-negative long containing the binary representation of the denied permissions of this override.
      • getAllowed

        @Nonnull
        public EnumSet<Permission> getAllowed()
        EnumSet of all Permissions that are specifically allowed by this override.
        Changes to the returned set do not affect this entity directly.
        Returns:
        Possibly-empty set of allowed Permissions.
      • getInherit

        @Nonnull
        public EnumSet<Permission> getInherit()
        EnumSet of all Permission that are unaffected by this override.
        Changes to the returned set do not affect this entity directly.
        Returns:
        Possibly-empty set of unaffected Permissions.
      • getDenied

        @Nonnull
        public EnumSet<Permission> getDenied()
        EnumSet of all Permissions that are denied by this override.
        Changes to the returned set do not affect this entity directly.
        Returns:
        Possibly-empty set of denied Permissions.
      • getIdLong

        public long getIdLong()
        The ids of roles are their position as stored by Discord so this will not look like a typical snowflake.
        Specified by:
        getIdLong in interface ISnowflake
        Returns:
        The id for the role this override is for