Interface TextChannelManager
- All Superinterfaces:
AuditableRestAction<Void>,BaseGuildMessageChannelManager<TextChannel,,TextChannelManager> ChannelManager<TextChannel,,TextChannelManager> ICategorizableChannelManager<TextChannel,,TextChannelManager> IPermissionContainerManager<TextChannel,,TextChannelManager> IPositionableChannelManager<TextChannel,,TextChannelManager> Manager<TextChannelManager>,RestAction<Void>
public interface TextChannelManager
extends BaseGuildMessageChannelManager<TextChannel,TextChannelManager>
Manager providing functionality common for all
TextChannels.
Example
manager.setSlowmode(10)
.queue();
manager.reset(ChannelManager.PARENT | ChannelManager.NAME)
.setTopic("nsfw-commits")
.setNSFW(true)
.queue();
- See Also:
-
Field Summary
Fields inherited from interface net.dv8tion.jda.api.managers.channel.ChannelManager
ARCHIVED, AUTO_ARCHIVE_DURATION, BITRATE, INVITEABLE, LOCKED, NAME, NSFW, PARENT, PERMISSION, POSITION, REGION, SLOWMODE, TOPIC, TYPE, USERLIMIT -
Method Summary
Modifier and TypeMethodDescriptionsetSlowmode(int slowmode) Sets the slowmode of the selectedTextChannel.setType(ChannelType type) Converts the selected channel to a differentChannelType.Methods inherited from interface net.dv8tion.jda.api.requests.restaction.AuditableRestAction
reasonMethods inherited from interface net.dv8tion.jda.api.managers.channel.middleman.BaseGuildMessageChannelManager
setNSFW, setTopicMethods inherited from interface net.dv8tion.jda.api.managers.channel.ChannelManager
getChannel, getGuild, reset, reset, setNameMethods inherited from interface net.dv8tion.jda.api.managers.channel.attribute.ICategorizableChannelManager
setParent, sync, syncMethods inherited from interface net.dv8tion.jda.api.managers.channel.attribute.IPermissionContainerManager
clearOverridesAdded, clearOverridesRemoved, putMemberPermissionOverride, putMemberPermissionOverride, putPermissionOverride, putPermissionOverride, putRolePermissionOverride, putRolePermissionOverride, removePermissionOverride, removePermissionOverrideMethods inherited from interface net.dv8tion.jda.api.managers.channel.attribute.IPositionableChannelManager
setPositionMethods inherited from interface net.dv8tion.jda.api.managers.Manager
deadline, reset, setCheck, timeoutMethods inherited from interface net.dv8tion.jda.api.requests.RestAction
addCheck, and, and, complete, complete, completeAfter, delay, delay, delay, delay, flatMap, flatMap, getCheck, getJDA, map, mapToResult, onErrorFlatMap, onErrorFlatMap, onErrorMap, onErrorMap, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submit, submitAfter, submitAfter, zip
-
Method Details
-
setSlowmode
Sets the slowmode of the selectedTextChannel.
Provide0to reset the slowmode of theTextChannelA channel slowmode must not be negative nor greater than
TextChannel.MAX_SLOWMODE!Note: Bots are unaffected by this.
HavingMESSAGE_MANAGEorMANAGE_CHANNELpermission also grants immunity to slowmode.- Parameters:
slowmode- The new slowmode for the selectedTextChannel- Returns:
- ChannelManager for chaining convenience
- Throws:
IllegalArgumentException- If the provided slowmode is negative or greater thanTextChannel.MAX_SLOWMODE- See Also:
-
setType
Converts the selected channel to a differentChannelType.
This can only be done in the follow situations:Current Channel Type New Channel Type ChannelType.NEWS-> ChannelType.TEXTChannelType.TEXT-> ChannelType.NEWS- Parameters:
type- The new not-nullChannelTypeof the channel- Returns:
- ChannelManager for chaining convenience
- Throws:
IllegalArgumentException- IfchannelTypeis notChannelType.TEXTorChannelType.NEWSUnsupportedOperationException- If this ChannelAction is not for aTextChannelorNewsChannelIllegalStateException- IfchannelTypeisChannelType.NEWSand the guild doesn't have theNEWSfeature inGuild.getFeatures().- See Also:
-