Package com.mewna.catnip.entity.channel
Interface Channel
- All Superinterfaces:
Entity
,Snowflake
,Timestamped
- All Known Subinterfaces:
Category
,DMChannel
,GroupDMChannel
,GuildChannel
,MessageChannel
,NewsChannel
,StageChannel
,StoreChannel
,TextChannel
,ThreadChannel
,UserDMChannel
,VoiceChannel
- All Known Implementing Classes:
CategoryImpl
,GroupDMChannelImpl
,NewsChannelImpl
,StageChannelImpl
,StoreChannelImpl
,TextChannelImpl
,ThreadChannelImpl
,UserDMChannelImpl
,VoiceChannelImpl
A Discord channel. A channel may not be attached to a guild (ex. in the case
of DMs).
- Since:
- 9/12/18
- Author:
- natanbc
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mewna.catnip.entity.partials.Timestamped
Timestamped.TimestampStyle
-
Method Summary
Modifier and TypeMethodDescriptiondefault Category
default DMChannel
default GroupDMChannel
default GuildChannel
default MessageChannel
default TextChannel
default UserDMChannel
default VoiceChannel
default io.reactivex.rxjava3.core.Single<Channel>
delete()
Deletes the channel.default io.reactivex.rxjava3.core.Single<Channel>
Deletes the channel.default boolean
default boolean
isDM()
default boolean
default boolean
isGuild()
default boolean
default boolean
isNews()
Whether or not this channel is a news channel.default boolean
isStore()
Whether or not this channel is a store channel.default boolean
isText()
default boolean
isUserDM()
default boolean
isVoice()
type()
Methods inherited from interface com.mewna.catnip.entity.partials.Snowflake
creationTime, creationTimestamp, id, idAsLong
Methods inherited from interface com.mewna.catnip.entity.partials.Timestamped
asDiscordTimestamp, parseTimestamp
-
Method Details
-
type
- Returns:
- The type of this channel.
-
delete
Deletes the channel. This operation cannot be undone.- Parameters:
reason
- The reason that will be displayed in audit log- Returns:
- A
Observable
that is completed when the channel is deleted.
-
delete
Deletes the channel. This operation cannot be undone.- Returns:
- A
Observable
that is completed when the channel is deleted.
-
isText
@CheckReturnValue default boolean isText()- Returns:
- Whether or not this channel is a text channel.
-
isVoice
@CheckReturnValue default boolean isVoice()- Returns:
- Whether or not this channel is a voice channel.
-
isCategory
@CheckReturnValue default boolean isCategory()- Returns:
- Whether or not this channel is a category.
-
isGuild
@CheckReturnValue default boolean isGuild()- Returns:
- Whether or not this channel is in a guild.
-
isUserDM
@CheckReturnValue default boolean isUserDM()- Returns:
- Whether or not this channel is a DM with a single user.
-
isGroupDM
@CheckReturnValue default boolean isGroupDM()- Returns:
- Whether or not this channel is a group DM with at least 1 other user.
-
isDM
@CheckReturnValue default boolean isDM()- Returns:
- Whether or not this channel is a DM; see
isUserDM()
andisGroupDM()
for more.
-
isNews
@CheckReturnValue default boolean isNews()Whether or not this channel is a news channel. See discordapp/discord-api-docs#881. -
isStore
@CheckReturnValue default boolean isStore()Whether or not this channel is a store channel. See discordapp/discord-api-docs#881 and discordapp/discord-api-docs#889. -
isGuildMessageChannel
@CheckReturnValue default boolean isGuildMessageChannel()- Returns:
- Whether or not this channel is part of a guild and can contain messages.
-
asGuildChannel
- Returns:
- This channel instance as a
GuildChannel
.
-
asTextChannel
- Returns:
- This channel instance as a
TextChannel
.
-
asVoiceChannel
- Returns:
- This channel instance as a
VoiceChannel
.
-
asCategory
- Returns:
- This channel instance as a
Category
.
-
asDMChannel
- Returns:
- This channel instance as a
DMChannel
.
-
asUserDMChannel
- Returns:
- This channel instance as a
UserDMChannel
.
-
asGroupDMChannel
- Returns:
- This channel instance as a
GroupDMChannel
.
-
asMessageChannel
-