Package org.javacord.api.entity.channel
Class ServerTextChannelUpdater
- java.lang.Object
-
- org.javacord.api.entity.channel.ServerChannelUpdater<T>
-
- org.javacord.api.entity.channel.RegularServerChannelUpdater<ServerTextChannelUpdater>
-
- org.javacord.api.entity.channel.ServerTextChannelUpdater
-
public class ServerTextChannelUpdater extends RegularServerChannelUpdater<ServerTextChannelUpdater>
This class can be used to update server text channels.
-
-
Field Summary
-
Fields inherited from class org.javacord.api.entity.channel.RegularServerChannelUpdater
regularServerChannelUpdaterDelegate
-
-
Constructor Summary
Constructors Constructor Description ServerTextChannelUpdater(ServerTextChannel channel)Creates a new server text channel updater.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerTextChannelUpdaterremoveCategory()Queues the category to be removed.ServerTextChannelUpdatersetCategory(ChannelCategory category)Queues the category to be updated.ServerTextChannelUpdatersetNsfwFlag(boolean nsfw)Queues the nsfw to be updated.ServerTextChannelUpdatersetSlowmodeDelayInSeconds(int delay)Set the delay for slowmode.ServerTextChannelUpdatersetTopic(java.lang.String topic)Queues the topic to be updated.ServerTextChannelUpdaterunsetSlowmode()Unset the slowmode.java.util.concurrent.CompletableFuture<java.lang.Void>update()Performs the queued updates.-
Methods inherited from class org.javacord.api.entity.channel.RegularServerChannelUpdater
addPermissionOverwrite, removePermissionOverwrite, setRawPosition
-
Methods inherited from class org.javacord.api.entity.channel.ServerChannelUpdater
setAuditLogReason, setName
-
-
-
-
Constructor Detail
-
ServerTextChannelUpdater
public ServerTextChannelUpdater(ServerTextChannel channel)
Creates a new server text channel updater.- Parameters:
channel- The channel to update.
-
-
Method Detail
-
setTopic
public ServerTextChannelUpdater setTopic(java.lang.String topic)
Queues the topic to be updated.- Parameters:
topic- The new topic of the channel.- Returns:
- The current instance in order to chain call methods.
-
setNsfwFlag
public ServerTextChannelUpdater setNsfwFlag(boolean nsfw)
Queues the nsfw to be updated.- Parameters:
nsfw- The new nsfw flag of the channel.- Returns:
- The current instance in order to chain call methods.
-
setCategory
public ServerTextChannelUpdater setCategory(ChannelCategory category)
Queues the category to be updated.- Parameters:
category- The new category of the channel.- Returns:
- The current instance in order to chain call methods.
-
removeCategory
public ServerTextChannelUpdater removeCategory()
Queues the category to be removed.- Returns:
- The current instance in order to chain call methods.
-
setSlowmodeDelayInSeconds
public ServerTextChannelUpdater setSlowmodeDelayInSeconds(int delay)
Set the delay for slowmode.- Parameters:
delay- The delay in seconds.- Returns:
- The current instance in order to chain call methods.
-
unsetSlowmode
public ServerTextChannelUpdater unsetSlowmode()
Unset the slowmode.- Returns:
- The current instance in order to chain call methods.
-
update
public java.util.concurrent.CompletableFuture<java.lang.Void> update()
Description copied from class:ServerChannelUpdaterPerforms the queued updates.- Overrides:
updatein classServerChannelUpdater<ServerTextChannelUpdater>- Returns:
- A future to check if the update was successful.
-
-