Package org.javacord.api.entity.channel
Class ServerVoiceChannelUpdater
- java.lang.Object
-
- org.javacord.api.entity.channel.ServerChannelUpdater<T>
-
- org.javacord.api.entity.channel.RegularServerChannelUpdater<ServerVoiceChannelUpdater>
-
- org.javacord.api.entity.channel.ServerVoiceChannelUpdater
-
public class ServerVoiceChannelUpdater extends RegularServerChannelUpdater<ServerVoiceChannelUpdater>
This class can be used to update server voice channels.
-
-
Field Summary
-
Fields inherited from class org.javacord.api.entity.channel.RegularServerChannelUpdater
regularServerChannelUpdaterDelegate
-
-
Constructor Summary
Constructors Constructor Description ServerVoiceChannelUpdater(ServerVoiceChannel channel)Creates a new server voice channel updater.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerVoiceChannelUpdaterremoveCategory()Queues the category to be removed.ServerVoiceChannelUpdaterremoveUserLimit()Queues the user limit to be removed.ServerVoiceChannelUpdatersetBitrate(int bitrate)Queues the bitrate to be updated.ServerVoiceChannelUpdatersetCategory(ChannelCategory category)Queues the category to be updated.ServerVoiceChannelUpdatersetNsfw(boolean nsfw)Queues the nsfw flag to be updated.ServerVoiceChannelUpdatersetUserLimit(int userLimit)Queues the user limit to be updated.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
-
ServerVoiceChannelUpdater
public ServerVoiceChannelUpdater(ServerVoiceChannel channel)
Creates a new server voice channel updater.- Parameters:
channel- The channel to update.
-
-
Method Detail
-
setBitrate
public ServerVoiceChannelUpdater setBitrate(int bitrate)
Queues the bitrate to be updated.- Parameters:
bitrate- The new bitrate of the channel.- Returns:
- The current instance in order to chain call methods.
-
setUserLimit
public ServerVoiceChannelUpdater setUserLimit(int userLimit)
Queues the user limit to be updated.- Parameters:
userLimit- The new user limit of the channel.- Returns:
- The current instance in order to chain call methods.
-
removeUserLimit
public ServerVoiceChannelUpdater removeUserLimit()
Queues the user limit to be removed.- Returns:
- The current instance in order to chain call methods.
-
setCategory
public ServerVoiceChannelUpdater 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 ServerVoiceChannelUpdater removeCategory()
Queues the category to be removed.- Returns:
- The current instance in order to chain call methods.
-
setNsfw
public ServerVoiceChannelUpdater setNsfw(boolean nsfw)
Queues the nsfw flag to be updated.- Parameters:
nsfw- Whether the channel should be marked as 'not safe for work' or not.- 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<ServerVoiceChannelUpdater>- Returns:
- A future to check if the update was successful.
-
-