Package org.javacord.api.entity.channel
Class ServerVoiceChannelBuilder
- java.lang.Object
-
- org.javacord.api.entity.channel.ServerChannelBuilder
-
- org.javacord.api.entity.channel.ServerVoiceChannelBuilder
-
public class ServerVoiceChannelBuilder extends ServerChannelBuilder
This class is used to create new server voice channels.
-
-
Constructor Summary
Constructors Constructor Description ServerVoiceChannelBuilder(Server server)Creates a new server text channel builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Permissionable & DiscordEntity>
ServerVoiceChannelBuilderaddPermissionOverwrite(T permissionable, Permissions permissions)Adds a permission overwrite for the given entity.CompletableFuture<ServerVoiceChannel>create()Creates the server voice channel.<T extends Permissionable & DiscordEntity>
ServerVoiceChannelBuilderremovePermissionOverwrite(T permissionable)Removes a permission overwrite for the given entity.ServerVoiceChannelBuildersetAuditLogReason(String reason)Sets the reason for this creation.ServerVoiceChannelBuildersetBitrate(int bitrate)Sets the bitrate of the channel.ServerVoiceChannelBuildersetCategory(ChannelCategory category)Sets the category of the channel.ServerVoiceChannelBuildersetName(String name)Sets the name of the channel.ServerVoiceChannelBuildersetUserlimit(int userlimit)Sets the user limit of the channel.
-
-
-
Constructor Detail
-
ServerVoiceChannelBuilder
public ServerVoiceChannelBuilder(Server server)
Creates a new server text channel builder.- Parameters:
server- The server of the server text channel.
-
-
Method Detail
-
setAuditLogReason
public ServerVoiceChannelBuilder setAuditLogReason(String reason)
Description copied from class:ServerChannelBuilderSets the reason for this creation. This reason will be visible in the audit log entry(s).- Overrides:
setAuditLogReasonin classServerChannelBuilder- Parameters:
reason- The reason for this update.- Returns:
- The current instance in order to chain call methods.
-
setName
public ServerVoiceChannelBuilder setName(String name)
Description copied from class:ServerChannelBuilderSets the name of the channel.- Overrides:
setNamein classServerChannelBuilder- Parameters:
name- The name of the channel.- Returns:
- The current instance in order to chain call methods.
-
setCategory
public ServerVoiceChannelBuilder setCategory(ChannelCategory category)
Sets the category of the channel.- Parameters:
category- The category of the channel.- Returns:
- The current instance in order to chain call methods.
-
setBitrate
public ServerVoiceChannelBuilder setBitrate(int bitrate)
Sets the bitrate of the channel.- Parameters:
bitrate- The bitrate of the channel.- Returns:
- The current instance in order to chain call methods.
-
setUserlimit
public ServerVoiceChannelBuilder setUserlimit(int userlimit)
Sets the user limit of the channel.- Parameters:
userlimit- The user limit of the channel.- Returns:
- The current instance in order to chain call methods.
-
addPermissionOverwrite
public <T extends Permissionable & DiscordEntity> ServerVoiceChannelBuilder addPermissionOverwrite(T permissionable, Permissions permissions)
Description copied from class:ServerChannelBuilderAdds a permission overwrite for the given entity.- Overrides:
addPermissionOverwritein classServerChannelBuilder- Type Parameters:
T- The type of entity to hold the permission, usuallyUserorRole- Parameters:
permissionable- The entity whose permissions should be overwritten.permissions- The permission overwrites.- Returns:
- The current instance in order to chain call methods.
-
removePermissionOverwrite
public <T extends Permissionable & DiscordEntity> ServerVoiceChannelBuilder removePermissionOverwrite(T permissionable)
Description copied from class:ServerChannelBuilderRemoves a permission overwrite for the given entity.- Overrides:
removePermissionOverwritein classServerChannelBuilder- Type Parameters:
T- The type of entity to hold the permission, usuallyUserorRole- Parameters:
permissionable- The entity which permission overwrite should be removed.- Returns:
- The current instance in order to chain call methods.
-
create
public CompletableFuture<ServerVoiceChannel> create()
Creates the server voice channel.- Returns:
- The created voice channel.
-
-