Package org.javacord.api.entity.channel
Class ServerChannelUpdater<T extends ServerChannelUpdater<T>>
- java.lang.Object
-
- org.javacord.api.entity.channel.ServerChannelUpdater<T>
-
- Direct Known Subclasses:
RegularServerChannelUpdater,ServerThreadChannelUpdater
public class ServerChannelUpdater<T extends ServerChannelUpdater<T>> extends java.lang.ObjectThis class can be used to update server channels.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedServerChannelUpdater(ServerChannelUpdaterDelegate serverChannelUpdaterDelegate)Creates a new server channel updater.ServerChannelUpdater(ServerChannel serverChannel)Creates a new server channel updater.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TsetAuditLogReason(java.lang.String reason)Sets the reason for this update.TsetName(java.lang.String name)Queues the name to be updated.java.util.concurrent.CompletableFuture<java.lang.Void>update()Performs the queued updates.
-
-
-
Constructor Detail
-
ServerChannelUpdater
protected ServerChannelUpdater(ServerChannelUpdaterDelegate serverChannelUpdaterDelegate)
Creates a new server channel updater.
-
ServerChannelUpdater
public ServerChannelUpdater(ServerChannel serverChannel)
Creates a new server channel updater.- Parameters:
serverChannel- The server channel to update.
-
-
Method Detail
-
setAuditLogReason
public T setAuditLogReason(java.lang.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.- Returns:
- The current instance in order to chain call methods.
-
setName
public T setName(java.lang.String name)
Queues the name to be updated.- Parameters:
name- The new name of the channel.- Returns:
- The current instance in order to chain call methods.
-
update
public java.util.concurrent.CompletableFuture<java.lang.Void> update()
Performs the queued updates.- Returns:
- A future to check if the update was successful.
-
-