Package com.mewna.catnip.entity.channel
Interface VoiceChannel
- All Superinterfaces:
Channel
,Entity
,GuildChannel
,GuildEntity
,HasGuild
,HasName
,HasParentChannel
,Mentionable
,MessageChannel
,Snowflake
,TextChannel
,Timestamped
- All Known Subinterfaces:
StageChannel
- All Known Implementing Classes:
StageChannelImpl
,VoiceChannelImpl
A voice channel in a guild.
- Since:
- 9/12/18
- Author:
- natanbc
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mewna.catnip.entity.channel.Channel
Channel.ChannelType
Nested classes/interfaces inherited from interface com.mewna.catnip.entity.channel.GuildChannel
GuildChannel.ChannelEditFields
Nested classes/interfaces inherited from interface com.mewna.catnip.entity.partials.Timestamped
Timestamped.TimestampStyle
-
Method Summary
Modifier and TypeMethodDescriptionint
bitrate()
default boolean
default boolean
isText()
default boolean
isVoice()
default boolean
nsfw()
default void
Opens a voice connection to this channel.default int
The slowmode set on this channel.default String
topic()
Voice channels will never have a topic.int
Methods inherited from interface com.mewna.catnip.entity.channel.Channel
asCategory, asDMChannel, asGroupDMChannel, asGuildChannel, asMessageChannel, asTextChannel, asUserDMChannel, asVoiceChannel, delete, isGuildMessageChannel, isStore, type
Methods inherited from interface com.mewna.catnip.entity.channel.GuildChannel
createInvite, createInvite, createInvite, delete, edit, fetchInvites, isDM, isGroupDM, isGuild, isUserDM, overrides, position
Methods inherited from interface com.mewna.catnip.entity.partials.GuildEntity
guild
Methods inherited from interface com.mewna.catnip.entity.partials.HasGuild
guildId, guildIdAsLong
Methods inherited from interface com.mewna.catnip.entity.partials.HasParentChannel
parentId, parentIdAsLong
Methods inherited from interface com.mewna.catnip.entity.channel.MessageChannel
addReaction, addReaction, bulkRemoveReaction, deleteMessage, deleteMessage, deleteOwnReaction, deleteOwnReaction, deleteUserReaction, deleteUserReaction, editMessage, editMessage, editMessage, fetchMessage, fetchMessages, sendMessage, sendMessage, sendMessage, sendMessage, triggerTypingIndicator
Methods inherited from interface com.mewna.catnip.entity.partials.Snowflake
creationTime, creationTimestamp, id, idAsLong
Methods inherited from interface com.mewna.catnip.entity.channel.TextChannel
asMention, fetchWebhooks, isNews
Methods inherited from interface com.mewna.catnip.entity.partials.Timestamped
asDiscordTimestamp, parseTimestamp
-
Method Details
-
bitrate
@CheckReturnValue int bitrate()- Returns:
- The bitrate of this channel. Will be from 8 to 96.
-
userLimit
@CheckReturnValue int userLimit()- Returns:
- The maximum number of users allowed in this voice channel at once.
-
openVoiceConnection
default void openVoiceConnection()Opens a voice connection to this channel. This method is equivalent tochannel.catnip().{@link com.mewna.catnip.Catnip#openVoiceConnection(String, String) openVoiceConnection}(channel.guildId(), channel.id())
-
isText
@CheckReturnValue default boolean isText()- Specified by:
isText
in interfaceChannel
- Specified by:
isText
in interfaceTextChannel
- Returns:
- Whether or not this channel is a text channel.
-
isVoice
@CheckReturnValue default boolean isVoice()- Specified by:
isVoice
in interfaceChannel
- Specified by:
isVoice
in interfaceTextChannel
- Returns:
- Whether or not this channel is a voice channel.
-
isCategory
@CheckReturnValue default boolean isCategory()- Specified by:
isCategory
in interfaceChannel
- Specified by:
isCategory
in interfaceTextChannel
- Returns:
- Whether or not this channel is a category.
-
topic
Voice channels will never have a topic.- Specified by:
topic
in interfaceTextChannel
- Returns:
null
-
nsfw
default boolean nsfw()- Specified by:
nsfw
in interfaceTextChannel
- Returns:
- Whether or not this channel has been marked as nsfw.
-
rateLimitPerUser
default int rateLimitPerUser()Description copied from interface:TextChannel
The slowmode set on this channel. A value of 0 means no slowmode. Bots are not affected by slowmode.- Specified by:
rateLimitPerUser
in interfaceTextChannel
- Returns:
- The slowmode set on this channel, in seconds.
-