public interface PermissionOverride
| Modifier and Type | Method | Description |
|---|---|---|
AuditableRestAction<java.lang.Void> |
delete() |
Deletes this PermissionOverride.
|
java.util.List<Permission> |
getAllowed() |
An unmodifiable list of all
Permissions that are specifically allowed by this override. |
long |
getAllowedRaw() |
This is the raw binary representation (as a base 10 long) of the permissions allowed by this override.
|
Channel |
getChannel() |
The
Channel that this PermissionOverride affects. |
java.util.List<Permission> |
getDenied() |
An unmodifiable list of all
Permissions that are denied by this override. |
long |
getDeniedRaw() |
This is the raw binary representation (as a base 10 long) of the permissions denied by this override.
|
Guild |
getGuild() |
|
java.util.List<Permission> |
getInherit() |
An unmodifiable list of all
Permission that are unaffected by this override. |
long |
getInheritRaw() |
This is the raw binary representation (as a base 10 long) of the permissions not affected by this override.
|
JDA |
getJDA() |
The
JDA instance that this PermissionOverride
is related to. |
PermOverrideManager |
getManager() |
Returns the
PermOverrideManager for this PermissionOverride. |
Member |
getMember() |
If this
PermissionOverride is an override dealing with
a Member, then this method will return the related Member. |
Role |
getRole() |
If this
PermissionOverride is an override dealing with
a Role, then this method will return the related Role. |
boolean |
isMemberOverride() |
Used to determine if this
PermissionOverride relates to
a specific Member. |
boolean |
isRoleOverride() |
Used to determine if this
PermissionOverride relates to
a specific Role. |
long getAllowedRaw()
Permission.long getInheritRaw()
Permission.long getDeniedRaw()
Permission.java.util.List<Permission> getAllowed()
Permissions that are specifically allowed by this override.Permissions.java.util.List<Permission> getInherit()
Permission that are unaffected by this override.Permissions.java.util.List<Permission> getDenied()
Permissions that are denied by this override.Permissions.JDA getJDA()
JDA instance that this PermissionOverride
is related to.JDA instance.Member getMember()
PermissionOverride is an override dealing with
a Member, then this method will return the related Member.
null.
isMemberOverride()
returns false, this returns null.Member.Role getRole()
PermissionOverride is an override dealing with
a Role, then this method will return the related Role.
null.
Basically: if isRoleOverride()
returns false, this returns null.Role.Channel getChannel()
Channel that this PermissionOverride affects.Channel that this override is part of.Guild getGuild()
Guild that the Channel
returned from getChannel() is a part of.
By inference, this is the Guild that this
PermissionOverride is part of.Guild.boolean isMemberOverride()
PermissionOverride relates to
a specific Member.boolean isRoleOverride()
PermissionOverride relates to
a specific Role.PermOverrideManager getManager()
PermOverrideManager for this PermissionOverride.
RestAction.queue().InsufficientPermissionException - If the currently logged in account does not have Permission.MANAGE_CHANNEL
or Permission.MANAGE_PERMISSIONS@CheckReturnValue AuditableRestAction<java.lang.Void> delete()
Possible ErrorResponses include:
ErrorResponse.UNKNOWN_OVERRIDE
UNKNOWN_CHANNEL
MISSING_ACCESS
AuditableRestActionInsufficientPermissionException - if we don't have the permission to MANAGE_CHANNEL