Package org.javacord.api.entity.channel
Class ServerChannelBuilder
- java.lang.Object
-
- org.javacord.api.entity.channel.ServerChannelBuilder
-
- Direct Known Subclasses:
ChannelCategoryBuilder,ServerTextChannelBuilder,ServerVoiceChannelBuilder
public class ServerChannelBuilder extends Object
This class is used to create new server channels.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedServerChannelBuilder()Creates a new server channel builder without delegate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Permissionable & DiscordEntity>
ServerChannelBuilderaddPermissionOverwrite(T permissionable, Permissions permissions)Adds a permission overwrite for the given entity.<T extends Permissionable & DiscordEntity>
ServerChannelBuilderremovePermissionOverwrite(T permissionable)Removes a permission overwrite for the given entity.ServerChannelBuildersetAuditLogReason(String reason)Sets the reason for this creation.ServerChannelBuildersetName(String name)Sets the name of the channel.
-
-
-
Method Detail
-
setAuditLogReason
public ServerChannelBuilder setAuditLogReason(String reason)
Sets the reason for this creation. This reason will be visible in the audit log entry(s).- Parameters:
reason- The reason for this update.- Returns:
- The current instance in order to chain call methods.
-
setName
public ServerChannelBuilder setName(String name)
Sets the name of the channel.- Parameters:
name- The name of the channel.- Returns:
- The current instance in order to chain call methods.
-
addPermissionOverwrite
public <T extends Permissionable & DiscordEntity> ServerChannelBuilder addPermissionOverwrite(T permissionable, Permissions permissions)
Adds a permission overwrite for the given entity.- 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> ServerChannelBuilder removePermissionOverwrite(T permissionable)
Removes a permission overwrite for the given entity.- 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.
-
-