Interface ServerChannelUpdaterDelegate
-
- All Known Subinterfaces:
ServerTextChannelUpdaterDelegate
,ServerVoiceChannelUpdaterDelegate
public interface ServerChannelUpdaterDelegate
This class is internally used by theServerChannelUpdater
to update server channels. You usually don't want to interact with this object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T extends Permissionable & DiscordEntity>
voidaddPermissionOverwrite(T permissionable, Permissions permissions)
Adds a permission overwrite for the given entity.<T extends Permissionable & DiscordEntity>
voidremovePermissionOverwrite(T permissionable)
Removes a permission overwrite for the given entity.void
setAuditLogReason(String reason)
Sets the reason for this update.void
setName(String name)
Queues the name to be updated.void
setRawPosition(int rawPosition)
Queues the raw position to be updated.CompletableFuture<Void>
update()
Performs the queued updates.
-
-
-
Method Detail
-
setAuditLogReason
void setAuditLogReason(String reason)
Sets the reason for this update. This reason will be visible in the audit log entry(s).- Parameters:
reason
- The reason for this update.
-
setName
void setName(String name)
Queues the name to be updated.- Parameters:
name
- The new name of the channel.
-
setRawPosition
void setRawPosition(int rawPosition)
Queues the raw position to be updated.- Parameters:
rawPosition
- The new position of the channel. If you want to update the position based on other channels, make sure to useServerChannel.getRawPosition()
instead ofServerChannel.getPosition()
!
-
addPermissionOverwrite
<T extends Permissionable & DiscordEntity> void addPermissionOverwrite(T permissionable, Permissions permissions)
Adds a permission overwrite for the given entity.- Type Parameters:
T
- The type of entity to hold the permission, usuallyUser
orRole
- Parameters:
permissionable
- The entity whose permissions should be overwritten.permissions
- The permission overwrites.
-
removePermissionOverwrite
<T extends Permissionable & DiscordEntity> void removePermissionOverwrite(T permissionable)
Removes a permission overwrite for the given entity.- Type Parameters:
T
- The type of entity to hold the permission, usuallyUser
orRole
- Parameters:
permissionable
- The entity whose permission overwrite should be removed.
-
update
CompletableFuture<Void> update()
Performs the queued updates.- Returns:
- A future to check if the update was successful.
-
-