Package org.javacord.api.entity.channel
Class RegularServerChannelUpdater<T extends RegularServerChannelUpdater<T>>
- java.lang.Object
-
- org.javacord.api.entity.channel.ServerChannelUpdater<T>
-
- org.javacord.api.entity.channel.RegularServerChannelUpdater<T>
-
- Direct Known Subclasses:
ServerForumChannelUpdater,ServerTextChannelUpdater,ServerVoiceChannelUpdater
public class RegularServerChannelUpdater<T extends RegularServerChannelUpdater<T>> extends ServerChannelUpdater<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected RegularServerChannelUpdaterDelegateregularServerChannelUpdaterDelegateThe regular server channel updater delegate used by this instance.
-
Constructor Summary
Constructors Modifier Constructor Description protectedRegularServerChannelUpdater(RegularServerChannelUpdaterDelegate regularServerChannelUpdaterDelegate)Creates a new regular server channel updater.RegularServerChannelUpdater(RegularServerChannel channel)Creates a new regular server channel updater.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <U extends Permissionable & DiscordEntity>
TaddPermissionOverwrite(U permissionable, Permissions permissions)Adds a permission overwrite for the given entity.<U extends Permissionable & DiscordEntity>
TremovePermissionOverwrite(U permissionable)Removes a permission overwrite for the given entity.TsetRawPosition(int rawPosition)Queues the raw position to be updated.-
Methods inherited from class org.javacord.api.entity.channel.ServerChannelUpdater
setAuditLogReason, setName, update
-
-
-
-
Field Detail
-
regularServerChannelUpdaterDelegate
protected final RegularServerChannelUpdaterDelegate regularServerChannelUpdaterDelegate
The regular server channel updater delegate used by this instance.
-
-
Constructor Detail
-
RegularServerChannelUpdater
protected RegularServerChannelUpdater(RegularServerChannelUpdaterDelegate regularServerChannelUpdaterDelegate)
Creates a new regular server channel updater.- Parameters:
regularServerChannelUpdaterDelegate- A subtype of a RegularServerChannelUpdaterDelegate.
-
RegularServerChannelUpdater
public RegularServerChannelUpdater(RegularServerChannel channel)
Creates a new regular server channel updater.- Parameters:
channel- The channel to update.
-
-
Method Detail
-
setRawPosition
public T setRawPosition(int rawPosition)
Queues the raw position to be updated.- Parameters:
rawPosition- The new position of the channel. If you want to update the position based on other channels, make sure to useRegularServerChannel.getRawPosition()instead ofRegularServerChannel.getPosition()!- Returns:
- The current instance in order to chain call methods.
-
addPermissionOverwrite
public <U extends Permissionable & DiscordEntity> T addPermissionOverwrite(U permissionable, Permissions permissions)
Adds a permission overwrite for the given entity.- Type Parameters:
U- 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 <U extends Permissionable & DiscordEntity> T removePermissionOverwrite(U permissionable)
Removes a permission overwrite for the given entity.- Type Parameters:
U- The type of entity to hold the permission, usuallyUserorRole- Parameters:
permissionable- The entity whose permission overwrite should be removed.- Returns:
- The current instance in order to chain call methods.
-
-