Interface NewsChannelManager
- All Superinterfaces:
AuditableRestAction<Void>
,ChannelManager<NewsChannel,
,NewsChannelManager> IAgeRestrictedChannelManager<NewsChannel,
,NewsChannelManager> ICategorizableChannelManager<NewsChannel,
,NewsChannelManager> IPermissionContainerManager<NewsChannel,
,NewsChannelManager> IPositionableChannelManager<NewsChannel,
,NewsChannelManager> IThreadContainerManager<NewsChannel,
,NewsChannelManager> Manager<NewsChannelManager>
,RestAction<Void>
,StandardGuildChannelManager<NewsChannel,
,NewsChannelManager> StandardGuildMessageChannelManager<NewsChannel,
NewsChannelManager>
public interface NewsChannelManager
extends StandardGuildMessageChannelManager<NewsChannel,NewsChannelManager>
Manager providing methods to modify a
NewsChannel
.
Example
manager.setName("no-more-news")
.setType(ChannelType.TEXT) // Changes channel type to TextChannel
.queue();
-
Field Summary
Fields inherited from interface net.dv8tion.jda.api.requests.restaction.AuditableRestAction
MAX_REASON_LENGTH
Fields inherited from interface net.dv8tion.jda.api.managers.channel.ChannelManager
APPLIED_TAGS, ARCHIVED, AUTO_ARCHIVE_DURATION, AVAILABLE_TAGS, BITRATE, DEFAULT_LAYOUT, DEFAULT_REACTION, DEFAULT_SORT_ORDER, DEFAULT_THREAD_SLOWMODE, HIDE_MEDIA_DOWNLOAD_OPTIONS, INVITEABLE, LOCKED, NAME, NSFW, PARENT, PERMISSION, PINNED, POSITION, REGION, REQUIRE_TAG, SLOWMODE, TOPIC, TYPE, USERLIMIT
-
Method Summary
Modifier and TypeMethodDescriptionsetType
(ChannelType type) Converts the selected channel to a differentChannelType
.Methods inherited from interface net.dv8tion.jda.api.requests.restaction.AuditableRestAction
reason
Methods inherited from interface net.dv8tion.jda.api.managers.channel.ChannelManager
getChannel, getGuild, reset, reset, setName
Methods inherited from interface net.dv8tion.jda.api.managers.channel.attribute.IAgeRestrictedChannelManager
setNSFW
Methods inherited from interface net.dv8tion.jda.api.managers.channel.attribute.ICategorizableChannelManager
setParent, sync, sync
Methods inherited from interface net.dv8tion.jda.api.managers.channel.attribute.IPermissionContainerManager
clearOverridesAdded, clearOverridesRemoved, putMemberPermissionOverride, putMemberPermissionOverride, putPermissionOverride, putPermissionOverride, putRolePermissionOverride, putRolePermissionOverride, removePermissionOverride, removePermissionOverride
Methods inherited from interface net.dv8tion.jda.api.managers.channel.attribute.IPositionableChannelManager
setPosition
Methods inherited from interface net.dv8tion.jda.api.managers.channel.attribute.IThreadContainerManager
setDefaultThreadSlowmode
Methods inherited from interface net.dv8tion.jda.api.managers.Manager
deadline, reset, setCheck, timeout
Methods 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, onSuccess, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submit, submitAfter, submitAfter, zip
Methods inherited from interface net.dv8tion.jda.api.managers.channel.middleman.StandardGuildMessageChannelManager
setTopic
-
Method Details
-
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.TEXT
ChannelType.TEXT
-> ChannelType.NEWS
- Parameters:
type
- The new not-nullChannelType
of the channel- Returns:
- ChannelManager for chaining convenience
- Throws:
IllegalArgumentException
- IfchannelType
is notChannelType.TEXT
orChannelType.NEWS
UnsupportedOperationException
- If this ChannelAction is not for aTextChannel
orNewsChannel
IllegalStateException
- IfchannelType
isChannelType.NEWS
and the guild doesn't have theNEWS
feature inGuild.getFeatures()
.- See Also:
-