public class PermOverrideManager
extends java.lang.Object
PermOverrideManagerUpdatable instance.
This decoration allows to modify a single field by automatically building an update RestAction
| Constructor and Description |
|---|
PermOverrideManager(PermissionOverride override)
Creates a new PermOverrideManager instance
|
| Modifier and Type | Method and Description |
|---|---|
AuditableRestAction<java.lang.Void> |
clear(java.util.Collection<Permission> permissions)
Clears the provided
Permissions bits
from the selected PermissionOverridie. |
AuditableRestAction<java.lang.Void> |
clear(long permissions)
Clears the provided
Permissions bits
from the selected PermissionOverridie. |
AuditableRestAction<java.lang.Void> |
clear(Permission... permissions)
Clears the provided
Permissions bits
from the selected PermissionOverridie. |
AuditableRestAction<java.lang.Void> |
deny(java.util.Collection<Permission> permissions)
Denies the provided
Permissions
from the selected PermissionOverridie. |
AuditableRestAction<java.lang.Void> |
deny(long permissions)
Denies the provided
Permissions bits
from the selected PermissionOverridie. |
AuditableRestAction<java.lang.Void> |
deny(Permission... permissions)
Denies the provided
Permissions
from the selected PermissionOverridie. |
Channel |
getChannel()
The
Channel this Manager's
PermissionOverride is in. |
Guild |
getGuild()
|
JDA |
getJDA()
The
JDA instance of this Manager |
PermissionOverride |
getPermissionOverride()
The target
PermissionOverride
that will be modified by this Manager |
AuditableRestAction<java.lang.Void> |
grant(java.util.Collection<Permission> permissions)
Grants the provided
Permissions
to the selected PermissionOverridie. |
AuditableRestAction<java.lang.Void> |
grant(long permissions)
Grants the provided
Permissions bits
to the selected PermissionOverridie. |
AuditableRestAction<java.lang.Void> |
grant(Permission... permissions)
Grants the provided
Permissions
to the selected PermissionOverridie. |
public PermOverrideManager(PermissionOverride override)
override - The PermissionOverride to managepublic Guild getGuild()
Guild this Manager's
Channel is in.
getPermissionOverride().getGuild()Guildpublic Channel getChannel()
Channel this Manager's
PermissionOverride is in.
getPermissionOverride().getChannel()Channelpublic PermissionOverride getPermissionOverride()
PermissionOverride
that will be modified by this ManagerPermissionOverride@CheckReturnValue public AuditableRestAction<java.lang.Void> grant(long permissions)
Permissions bits
to the selected PermissionOverridie.
PermOverrideManagerUpdatable.grant(long)permissions - The permissions to grant to the selected PermissionOverrideAuditableRestAction
#update()InsufficientPermissionException - If the currently logged in account does not have the Permission MANAGE_PERMISSIONSPermOverrideManagerUpdatable.grant(long),
PermOverrideManagerUpdatable.update()@CheckReturnValue public AuditableRestAction<java.lang.Void> grant(Permission... permissions)
Permissions
to the selected PermissionOverridie.
PermOverrideManagerUpdatable.grant(long)permissions - The permissions to grant to the selected PermissionOverrideAuditableRestAction
#update()InsufficientPermissionException - If the currently logged in account does not have the Permission MANAGE_PERMISSIONSjava.lang.IllegalArgumentException - If any of the provided Permissions is nullPermOverrideManagerUpdatable.grant(Permission...),
PermOverrideManagerUpdatable.update()@CheckReturnValue public AuditableRestAction<java.lang.Void> grant(java.util.Collection<Permission> permissions)
Permissions
to the selected PermissionOverridie.
PermOverrideManagerUpdatable.grant(long)permissions - The permissions to grant to the selected PermissionOverrideAuditableRestAction
#update()InsufficientPermissionException - If the currently logged in account does not have the Permission MANAGE_PERMISSIONSjava.lang.IllegalArgumentException - If any of the provided Permissions is nullPermOverrideManagerUpdatable.grant(Collection),
PermOverrideManagerUpdatable.update()@CheckReturnValue public AuditableRestAction<java.lang.Void> deny(long permissions)
Permissions bits
from the selected PermissionOverridie.
PermOverrideManagerUpdatable.deny(long)permissions - The permissions to deny from the selected PermissionOverrideAuditableRestAction
#update()InsufficientPermissionException - If the currently logged in account does not have the Permission MANAGE_PERMISSIONSPermOverrideManagerUpdatable.deny(long),
PermOverrideManagerUpdatable.update()@CheckReturnValue public AuditableRestAction<java.lang.Void> deny(Permission... permissions)
Permissions
from the selected PermissionOverridie.
PermOverrideManagerUpdatable.deny(long)permissions - The permissions to deny from the selected PermissionOverrideAuditableRestAction
#update()InsufficientPermissionException - If the currently logged in account does not have the Permission MANAGE_PERMISSIONSjava.lang.IllegalArgumentException - If any of the provided Permissions is nullPermOverrideManagerUpdatable.deny(Permission...),
PermOverrideManagerUpdatable.update()@CheckReturnValue public AuditableRestAction<java.lang.Void> deny(java.util.Collection<Permission> permissions)
Permissions
from the selected PermissionOverridie.
PermOverrideManagerUpdatable.deny(long)permissions - The permissions to deny from the selected PermissionOverrideAuditableRestAction
#update()InsufficientPermissionException - If the currently logged in account does not have the Permission MANAGE_PERMISSIONSjava.lang.IllegalArgumentException - If any of the provided Permissions is nullPermOverrideManagerUpdatable.deny(Collection),
PermOverrideManagerUpdatable.update()@CheckReturnValue public AuditableRestAction<java.lang.Void> clear(long permissions)
Permissions bits
from the selected PermissionOverridie.
PermOverrideManagerUpdatable.clear(long)
permissions - The permissions to clear from the selected PermissionOverrideAuditableRestAction
#update()InsufficientPermissionException - If the currently logged in account does not have the Permission MANAGE_PERMISSIONSPermOverrideManagerUpdatable.clear(long),
PermOverrideManagerUpdatable.update()@CheckReturnValue public AuditableRestAction<java.lang.Void> clear(Permission... permissions)
Permissions bits
from the selected PermissionOverridie.
PermOverrideManagerUpdatable.clear(long)
permissions - The permissions to clear from the selected PermissionOverrideAuditableRestAction
#update()InsufficientPermissionException - If the currently logged in account does not have the Permission MANAGE_PERMISSIONSjava.lang.IllegalArgumentException - If any of the provided Permissions is nullPermOverrideManagerUpdatable.clear(Permission...),
PermOverrideManagerUpdatable.update()@CheckReturnValue public AuditableRestAction<java.lang.Void> clear(java.util.Collection<Permission> permissions)
Permissions bits
from the selected PermissionOverridie.
PermOverrideManagerUpdatable.clear(long)
permissions - The permissions to clear from the selected PermissionOverrideAuditableRestAction
#update()InsufficientPermissionException - If the currently logged in account does not have the Permission MANAGE_PERMISSIONSjava.lang.IllegalArgumentException - If any of the provided Permissions is nullPermOverrideManagerUpdatable.clear(Collection),
PermOverrideManagerUpdatable.update()