Package org.javacord.api.entity.channel
Class ServerThreadChannelBuilder
- java.lang.Object
-
- org.javacord.api.entity.channel.ServerChannelBuilder<ServerThreadChannelBuilder>
-
- org.javacord.api.entity.channel.ServerThreadChannelBuilder
-
public class ServerThreadChannelBuilder extends ServerChannelBuilder<ServerThreadChannelBuilder>
This class is used to create new server thread channels.
-
-
Field Summary
-
Fields inherited from class org.javacord.api.entity.channel.ServerChannelBuilder
myClass
-
-
Constructor Summary
Constructors Constructor Description ServerThreadChannelBuilder(ServerTextChannel serverTextChannel, ChannelType threadType, java.lang.String name)Creates a new server thread channel builder for a ServerTextChannel.ServerThreadChannelBuilder(Message message, java.lang.String name)Creates a new server thread channel builder for a message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<ServerThreadChannel>create()Creates the server thread channel.ServerThreadChannelBuildersetAutoArchiveDuration(java.lang.Integer autoArchiveDuration)Sets the auto archive duration of the channel.ServerThreadChannelBuildersetAutoArchiveDuration(AutoArchiveDuration autoArchiveDuration)Sets the auto archive duration of the channel.ServerThreadChannelBuildersetInvitableFlag(java.lang.Boolean inviteable)Sets the invitable flag of the thread channel.ServerThreadChannelBuildersetSlowmodeDelayInSeconds(int delay)Sets the slowmode of the channel.-
Methods inherited from class org.javacord.api.entity.channel.ServerChannelBuilder
setAuditLogReason, setName
-
-
-
-
Constructor Detail
-
ServerThreadChannelBuilder
public ServerThreadChannelBuilder(ServerTextChannel serverTextChannel, ChannelType threadType, java.lang.String name)
Creates a new server thread channel builder for a ServerTextChannel.- Parameters:
serverTextChannel- The server text channel where the thread will be created in.threadType- The ChannelType of the thread.name- The name of the thread.
-
ServerThreadChannelBuilder
public ServerThreadChannelBuilder(Message message, java.lang.String name)
Creates a new server thread channel builder for a message.- Parameters:
message- The message where this thread should be created for.name- The name of the thread.
-
-
Method Detail
-
setInvitableFlag
public ServerThreadChannelBuilder setInvitableFlag(java.lang.Boolean inviteable)
Sets the invitable flag of the thread channel. Only available for private threads.- Parameters:
inviteable- Whether non-moderators can add other non-moderators to a thread; only available when creating a private thread.- Returns:
- The current instance in order to chain call methods.
-
setSlowmodeDelayInSeconds
public ServerThreadChannelBuilder 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.
-
setAutoArchiveDuration
public ServerThreadChannelBuilder setAutoArchiveDuration(java.lang.Integer autoArchiveDuration)
Sets the auto archive duration of the channel.- Parameters:
autoArchiveDuration- The auto archive duration in seconds.- Returns:
- The current instance in order to chain call methods.
-
setAutoArchiveDuration
public ServerThreadChannelBuilder setAutoArchiveDuration(AutoArchiveDuration autoArchiveDuration)
Sets the auto archive duration of the channel.- Parameters:
autoArchiveDuration- The auto archive duration type.- Returns:
- The current instance in order to chain call methods.
-
create
public java.util.concurrent.CompletableFuture<ServerThreadChannel> create()
Creates the server thread channel.- Returns:
- The created thread channel.
-
-