Class StageChannelImpl
- All Implemented Interfaces:
Comparable<GuildChannel>
,Formattable
,IAgeRestrictedChannel
,ICategorizableChannel
,ICopyableChannel
,IInviteContainer
,IMemberContainer
,IPermissionContainer
,IPositionableChannel
,ISlowmodeChannel
,IWebhookContainer
,Channel
,StageChannel
,AudioChannel
,GuildChannel
,GuildMessageChannel
,MessageChannel
,StandardGuildChannel
,AudioChannelUnion
,ChannelUnion
,GuildChannelUnion
,GuildMessageChannelUnion
,IPermissionContainerUnion
,IWebhookContainerUnion
,MessageChannelUnion
,IDetachableEntity
,IMentionable
,ISnowflake
,IAgeRestrictedChannelMixin<StageChannelImpl>
,ICategorizableChannelMixin<StageChannelImpl>
,IInviteContainerMixin<StageChannelImpl>
,IPermissionContainerMixin<StageChannelImpl>
,IPositionableChannelMixin<StageChannelImpl>
,ISlowmodeChannelMixin<StageChannelImpl>
,IWebhookContainerMixin<StageChannelImpl>
,ChannelMixin<StageChannelImpl>
,StageChannelMixin<StageChannelImpl>
,AudioChannelMixin<StageChannelImpl>
,GuildChannelMixin<StageChannelImpl>
,GuildMessageChannelMixin<StageChannelImpl>
,MessageChannelMixin<StageChannelImpl>
,StandardGuildChannelMixin<StageChannelImpl>
,IDetachableEntityMixin
-
Field Summary
Fields inherited from interface net.dv8tion.jda.api.entities.channel.Channel
MAX_NAME_LENGTH
Fields inherited from interface net.dv8tion.jda.api.entities.channel.middleman.GuildChannel
JUMP_URL
Fields inherited from interface net.dv8tion.jda.api.entities.channel.attribute.ISlowmodeChannel
MAX_SLOWMODE
Fields inherited from interface net.dv8tion.jda.api.entities.channel.concrete.StageChannel
MAX_USERLIMIT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCancels theRequest-to-Speak
.boolean
Whether the specifiedMember
can send messages in this channel.createStageInstance
(String topic) Create a newStageInstance
for this stage channel.int
The audio bitrate of the voice audio that is transmitted in this channel.getGuild()
Returns theGuild
that this GuildChannel is part of.long
The id for the most recent message sent in this current MessageChannel.Returns theChannelManager
for this GuildChannel.A List of allMembers
that are in this GuildChannel
ForTextChannels
, this returns all Members with thePermission.VIEW_CHANNEL
Permission.The raw region name for this channel.int
The slowmode set for this channel.StageInstance
attached to this stage channel.getType()
TheChannelType
for this channelint
The maximum amount ofMembers
that be in an audio connection within this channel concurrently.boolean
Whether this entity is detached.boolean
isNSFW()
Whether this channel is considered as age-restricted, also known as NSFW (Not-Safe-For-Work)Sends arequest-to-speak
indicator to the stage instance moderators.setBitrate
(int bitrate) setLatestMessageIdLong
(long latestMessageId) setNSFW
(boolean ageRestricted) setSlowmode
(int slowmode) setStageInstance
(StageInstance instance) setUserLimit
(int userlimit) Methods inherited from class net.dv8tion.jda.internal.entities.channel.middleman.AbstractStandardGuildChannelImpl
getParentCategoryIdLong, getPermissionOverrideMap, getPositionRaw, setParentCategory, setPosition
Methods inherited from class net.dv8tion.jda.internal.entities.channel.middleman.AbstractGuildChannelImpl
compareTo
Methods inherited from class net.dv8tion.jda.internal.entities.channel.AbstractChannelImpl
asAudioChannel, asCategory, asForumChannel, asGroupChannel, asGuildChannel, asGuildMessageChannel, asMediaChannel, asMessageChannel, asNewsChannel, asPrivateChannel, asStageChannel, asStandardGuildChannel, asStandardGuildMessageChannel, asTextChannel, asThreadChannel, asThreadContainer, asVoiceChannel, getIdLong, getJDA, getName, setName, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.dv8tion.jda.api.entities.channel.middleman.AudioChannel
getRegion
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.middleman.AudioChannelMixin
checkCanAccess
Methods inherited from interface net.dv8tion.jda.api.entities.channel.unions.AudioChannelUnion
asGuildMessageChannel, asStageChannel, asVoiceChannel
Methods inherited from interface net.dv8tion.jda.api.entities.channel.Channel
formatTo, getAsMention, getFlags, getJDA, getName
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.ChannelMixin
delete, setName
Methods inherited from interface net.dv8tion.jda.api.entities.channel.unions.ChannelUnion
asAudioChannel, asCategory, asForumChannel, asGroupChannel, asGuildChannel, asGuildMessageChannel, asMediaChannel, asMessageChannel, asNewsChannel, asPrivateChannel, asStageChannel, asStandardGuildChannel, asStandardGuildMessageChannel, asTextChannel, asThreadChannel, asThreadContainer, asVoiceChannel
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface net.dv8tion.jda.api.entities.channel.middleman.GuildChannel
getJumpUrl
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.middleman.GuildChannelMixin
checkCanManage, checkPermission, checkPermission, delete, hasPermission
Methods inherited from interface net.dv8tion.jda.api.entities.channel.unions.GuildChannelUnion
asAudioChannel, asCategory, asForumChannel, asGuildMessageChannel, asMediaChannel, asNewsChannel, asStageChannel, asStandardGuildChannel, asStandardGuildMessageChannel, asTextChannel, asThreadChannel, asThreadContainer, asVoiceChannel
Methods inherited from interface net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel
canTalk, clearReactionsById, clearReactionsById, deleteMessages, removeReactionById, sendStickers
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.middleman.GuildMessageChannelMixin
canDeleteOtherUsersMessages, checkCanAddReactions, checkCanControlMessagePins, checkCanRemoveReactions, checkCanSendFiles, checkCanSendMessage, checkCanSendMessageEmbeds, checkCanViewHistory, clearReactionsById, clearReactionsById, deleteMessagesByIds, removeReactionById, sendStickers
Methods inherited from interface net.dv8tion.jda.api.entities.channel.unions.GuildMessageChannelUnion
asAudioChannel, asNewsChannel, asStageChannel, asStandardGuildChannel, asStandardGuildMessageChannel, asTextChannel, asThreadChannel, asThreadContainer, asVoiceChannel
Methods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.ICategorizableChannel
getParentCategory, getParentCategoryId, getParentCategoryIdLong, getPositionInCategory
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.attribute.ICategorizableChannelMixin
isSynced, setParentCategory
Methods inherited from interface net.dv8tion.jda.internal.entities.detached.mixin.IDetachableEntityMixin
checkAttached, detachedException, detachedRequiresChannelException
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.attribute.IInviteContainerMixin
createInvite, retrieveInvites
Methods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.IPermissionContainer
getMemberPermissionOverrides, getRolePermissionOverrides
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.attribute.IPermissionContainerMixin
getPermissionContainer, getPermissionOverride, getPermissionOverrideMap, getPermissionOverrides, upsertPermissionOverride
Methods inherited from interface net.dv8tion.jda.api.entities.channel.unions.IPermissionContainerUnion
asAudioChannel, asCategory, asForumChannel, asGuildMessageChannel, asNewsChannel, asStageChannel, asStandardGuildChannel, asStandardGuildMessageChannel, asTextChannel, asThreadContainer, asVoiceChannel
Methods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.IPositionableChannel
getPosition, getPositionRaw
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.attribute.IPositionableChannelMixin
setPosition
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.attribute.IWebhookContainerMixin
createWebhook, deleteWebhookById, retrieveWebhooks
Methods inherited from interface net.dv8tion.jda.api.entities.channel.unions.IWebhookContainerUnion
asAudioChannel, asForumChannel, asGuildMessageChannel, asMediaChannel, asNewsChannel, asStageChannel, asStandardGuildChannel, asStandardGuildMessageChannel, asTextChannel, asThreadContainer, asVoiceChannel
Methods inherited from interface net.dv8tion.jda.api.entities.channel.middleman.MessageChannel
addReactionById, deleteMessageById, editMessageAttachmentsById, editMessageAttachmentsById, editMessageAttachmentsById, editMessageById, editMessageById, editMessageComponentsById, editMessageComponentsById, editMessageComponentsById, editMessageComponentsById, editMessageComponentsById, editMessageEmbedsById, editMessageEmbedsById, editMessageEmbedsById, editMessageFormatById, editMessageFormatById, endPollById, endPollById, getHistoryAfter, getHistoryAfter, getHistoryAround, getHistoryAround, getHistoryBefore, getHistoryBefore, getLatestMessageId, pinMessageById, purgeMessages, purgeMessagesById, purgeMessagesById, removeReactionById, retrieveMessageById, retrievePollVotersById, retrievePollVotersById, retrieveReactionUsersById, retrieveReactionUsersById, retrieveReactionUsersById, sendFiles, sendMessageComponents, sendMessageComponents, sendMessageFormat, unpinMessageById
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.middleman.MessageChannelMixin
addReactionById, bulkDeleteMessages, deleteMessageById, editMessageAttachmentsById, editMessageById, editMessageById, editMessageComponentsById, editMessageEmbedsById, getHistory, getHistoryAfter, getHistoryAround, getHistoryBefore, getHistoryFromBeginning, getIterableHistory, pinMessageById, purgeMessages, purgeMessagesById, removeReactionById, retrieveMessageById, retrievePinnedMessages, retrieveReactionUsersById, sendFiles, sendMessage, sendMessage, sendMessageComponents, sendMessageEmbeds, sendMessageEmbeds, sendMessagePoll, sendTyping, unpinMessageById
Methods inherited from interface net.dv8tion.jda.api.entities.channel.unions.MessageChannelUnion
asAudioChannel, asGroupChannel, asGuildMessageChannel, asNewsChannel, asPrivateChannel, asStageChannel, asTextChannel, asThreadChannel, asThreadContainer, asVoiceChannel
Methods inherited from interface net.dv8tion.jda.api.entities.channel.concrete.StageChannel
createCopy, isModerator
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.concrete.StageChannelMixin
createCopy
-
Constructor Details
-
StageChannelImpl
-
-
Method Details
-
isDetached
public boolean isDetached()Description copied from interface:IDetachableEntity
Whether this entity is detached.If this returns
true
, this entity cannot be retrieved, will never be updated, and most methods that would otherwise return aRestAction
will throw aDetachedEntityException
instead.- Specified by:
isDetached
in interfaceIDetachableEntity
- Returns:
True
, if the entity is detached
-
getGuild
Description copied from interface:GuildChannel
Returns theGuild
that this GuildChannel is part of.- Specified by:
getGuild
in interfaceGuildChannel
- Overrides:
getGuild
in classAbstractGuildChannelImpl<StageChannelImpl>
- Returns:
- Never-null
Guild
that this GuildChannel is part of.
-
getType
Description copied from interface:Channel
TheChannelType
for this channel -
getBitrate
public int getBitrate()Description copied from interface:AudioChannel
The audio bitrate of the voice audio that is transmitted in this channel. While higher bitrates can be sent to this channel, it will be scaled down by the client.
Default and recommended value is 64000- Specified by:
getBitrate
in interfaceAudioChannel
- Returns:
- The audio bitrate of this audio channel.
-
getUserLimit
public int getUserLimit()Description copied from interface:AudioChannel
The maximum amount ofMembers
that be in an audio connection within this channel concurrently.
Returns 0 if there is no limit.Moderators with the
VOICE_MOVE_OTHERS
permission can bypass this limit.- Specified by:
getUserLimit
in interfaceAudioChannel
- Returns:
- The maximum connections allowed in this channel concurrently
-
getRegionRaw
Description copied from interface:AudioChannel
The raw region name for this channel.
This will return null if the region is set to Automatic.- Specified by:
getRegionRaw
in interfaceAudioChannel
- Returns:
- Raw region name, or
null
if the region is set to automatic.
-
getStageInstance
Description copied from interface:StageChannel
StageInstance
attached to this stage channel.This indicates whether a stage channel is currently "live".
- Specified by:
getStageInstance
in interfaceStageChannel
- Returns:
- The
StageInstance
ornull
if this stage is not live
-
getMembers
Description copied from interface:IMemberContainer
A List of allMembers
that are in this GuildChannel
ForTextChannels
, this returns all Members with thePermission.VIEW_CHANNEL
Permission.
ForVoiceChannels
, this returns all Members that joined that VoiceChannel.
ForCategories
, this returns all Members who are in its child channels.- Specified by:
getMembers
in interfaceIMemberContainer
- Returns:
- An immutable List of
Members
that are in this GuildChannel.
-
createStageInstance
Description copied from interface:StageChannel
Create a newStageInstance
for this stage channel.Possible
ErrorResponses
include:STAGE_ALREADY_OPEN
If there already is an activeStageInstance
for this channelUNKNOWN_CHANNEL
If the channel was deleted
- Specified by:
createStageInstance
in interfaceStageChannel
- Parameters:
topic
- The topic of this stage instance, must be 1-120 characters long- Returns:
StageInstanceAction
-
getSlowmode
public int getSlowmode()Description copied from interface:ISlowmodeChannel
The slowmode set for this channel.
If slowmode is set, this returns anint
between 1 and 21600.
Otherwise, if no slowmode is set, this returns0
.Note bots are unaffected by this.
HavingMESSAGE_MANAGE
orMANAGE_CHANNEL
permission also grants immunity to slowmode.Special case
ForumChannels
use this to limit how many posts a user can create. The client refers to this as the post slowmode.- Specified by:
getSlowmode
in interfaceISlowmodeChannel
- Returns:
- The slowmode for this channel, between 1 and 21600, or
0
if no slowmode is set.
-
isNSFW
public boolean isNSFW()Description copied from interface:IAgeRestrictedChannel
Whether this channel is considered as age-restricted, also known as NSFW (Not-Safe-For-Work)- Specified by:
isNSFW
in interfaceIAgeRestrictedChannel
- Returns:
- True, If this channel is age-restricted by the official Discord Client
-
canTalk
Description copied from interface:GuildMessageChannel
Whether the specifiedMember
can send messages in this channel.
Checks for bothPermission.VIEW_CHANNEL
andPermission.MESSAGE_SEND
.- Specified by:
canTalk
in interfaceGuildMessageChannel
- Parameters:
member
- The Member to check- Returns:
- True, if the specified member is able to read and send messages in this channel
-
getLatestMessageIdLong
public long getLatestMessageIdLong()Description copied from interface:MessageChannel
The id for the most recent message sent in this current MessageChannel.This value is updated on each
MessageReceivedEvent
and the value might point to an already deleted message since the value is not cleared when the message is deleted, so callingMessageChannel.retrieveMessageById(long)
with this id can result in anUNKNOWN_MESSAGE
error- Specified by:
getLatestMessageIdLong
in interfaceMessageChannel
- Returns:
- The most recent message's id or 0 if no messages are present
-
getManager
Description copied from interface:GuildChannel
Returns theChannelManager
for this GuildChannel.
In the ChannelManager, you can modify the name, topic and position of this GuildChannel. You modify multiple fields in one request by chaining setters before callingRestAction.queue()
.- Specified by:
getManager
in interfaceAudioChannel
- Specified by:
getManager
in interfaceGuildChannel
- Specified by:
getManager
in interfaceICategorizableChannel
- Specified by:
getManager
in interfaceIPermissionContainer
- Specified by:
getManager
in interfaceIPositionableChannel
- Specified by:
getManager
in interfaceISlowmodeChannel
- Specified by:
getManager
in interfaceStageChannel
- Specified by:
getManager
in interfaceStandardGuildChannel
- Returns:
- The ChannelManager of this GuildChannel
- See Also:
-
requestToSpeak
Description copied from interface:StageChannel
Sends arequest-to-speak
indicator to the stage instance moderators.If the self member has
Permission.VOICE_MUTE_OTHERS
this will immediately promote them to speaker.- Specified by:
requestToSpeak
in interfaceStageChannel
- Returns:
RestAction
- See Also:
-
cancelRequestToSpeak
Description copied from interface:StageChannel
Cancels theRequest-to-Speak
.
This can also be used to move back to the audience if you are currently a speaker.If there is no request to speak or the member is not currently connected to an active
StageInstance
, this does nothing.- Specified by:
cancelRequestToSpeak
in interfaceStageChannel
- Returns:
RestAction
- See Also:
-
setBitrate
- Specified by:
setBitrate
in interfaceAudioChannelMixin<StageChannelImpl>
-
setUserLimit
- Specified by:
setUserLimit
in interfaceAudioChannelMixin<StageChannelImpl>
-
setRegion
- Specified by:
setRegion
in interfaceAudioChannelMixin<StageChannelImpl>
-
setStageInstance
-
setNSFW
- Specified by:
setNSFW
in interfaceIAgeRestrictedChannelMixin<StageChannelImpl>
-
setSlowmode
- Specified by:
setSlowmode
in interfaceISlowmodeChannelMixin<StageChannelImpl>
-
setLatestMessageIdLong
- Specified by:
setLatestMessageIdLong
in interfaceMessageChannelMixin<StageChannelImpl>
-