Package org.javacord.api.entity.channel
Class ServerTextChannelBuilder
- java.lang.Object
-
- org.javacord.api.entity.channel.ServerChannelBuilder
-
- org.javacord.api.entity.channel.ServerTextChannelBuilder
-
public class ServerTextChannelBuilder extends ServerChannelBuilder
This class is used to create new server text channels.
-
-
Constructor Summary
Constructors Constructor Description ServerTextChannelBuilder(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>
ServerTextChannelBuilderaddPermissionOverwrite(T permissionable, Permissions permissions)Adds a permission overwrite for the given entity.CompletableFuture<ServerTextChannel>create()Creates the server text channel.<T extends Permissionable & DiscordEntity>
ServerTextChannelBuilderremovePermissionOverwrite(T permissionable)Removes a permission overwrite for the given entity.ServerTextChannelBuildersetAuditLogReason(String reason)Sets the reason for this creation.ServerTextChannelBuildersetCategory(ChannelCategory category)Sets the category of the channel.ServerTextChannelBuildersetName(String name)Sets the name of the channel.ServerTextChannelBuildersetSlowmodeDelayInSeconds(int delay)Sets the slowmode of the channel.ServerTextChannelBuildersetTopic(String topic)Sets the topic of the channel.
-
-
-
Constructor Detail
-
ServerTextChannelBuilder
public ServerTextChannelBuilder(Server server)
Creates a new server text channel builder.- Parameters:
server- The server of the server text channel.
-
-
Method Detail
-
setAuditLogReason
public ServerTextChannelBuilder 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 ServerTextChannelBuilder 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.
-
setTopic
public ServerTextChannelBuilder setTopic(String topic)
Sets the topic of the channel.- Parameters:
topic- The topic of the channel.- Returns:
- The current instance in order to chain call methods.
-
setCategory
public ServerTextChannelBuilder 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.
-
setSlowmodeDelayInSeconds
public ServerTextChannelBuilder setSlowmodeDelayInSeconds(int delay)
Sets the slowmode of the channel.- Parameters:
delay- The delay in seconds.- Returns:
- The current instance in order to chain call methods.
-
addPermissionOverwrite
public <T extends Permissionable & DiscordEntity> ServerTextChannelBuilder 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> ServerTextChannelBuilder 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<ServerTextChannel> create()
Creates the server text channel.- Returns:
- The created text channel.
-
-