Package com.mewna.catnip.entity.channel
Interface GuildChannel
- All Superinterfaces:
Channel
,Entity
,GuildEntity
,HasGuild
,HasName
,HasParentChannel
,Snowflake
,Timestamped
- All Known Subinterfaces:
Category
,NewsChannel
,StageChannel
,StoreChannel
,TextChannel
,ThreadChannel
,VoiceChannel
- All Known Implementing Classes:
CategoryImpl
,NewsChannelImpl
,StageChannelImpl
,StoreChannelImpl
,TextChannelImpl
,ThreadChannelImpl
,VoiceChannelImpl
A 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.partials.Timestamped
Timestamped.TimestampStyle
-
Method Summary
Modifier and TypeMethodDescriptiondefault io.reactivex.rxjava3.core.Single<CreatedInvite>
Creates a new invite to this channel.default io.reactivex.rxjava3.core.Single<CreatedInvite>
createInvite
(InviteCreateOptions options) Creates a new invite to this channel.default io.reactivex.rxjava3.core.Single<CreatedInvite>
createInvite
(InviteCreateOptions options, String reason) Creates a new invite to this channel.default io.reactivex.rxjava3.core.Single<Channel>
delete()
Deletes the channel.default GuildChannel.ChannelEditFields
edit()
Edit this channel.default io.reactivex.rxjava3.core.Observable<CreatedInvite>
The list of all invites to this channel.default boolean
isDM()
default boolean
default boolean
isGuild()
default boolean
isUserDM()
int
position()
Methods inherited from interface com.mewna.catnip.entity.channel.Channel
asCategory, asDMChannel, asGroupDMChannel, asGuildChannel, asMessageChannel, asTextChannel, asUserDMChannel, asVoiceChannel, delete, isCategory, isGuildMessageChannel, isNews, isStore, isText, isVoice, type
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.partials.Snowflake
creationTime, creationTimestamp, id, idAsLong
Methods inherited from interface com.mewna.catnip.entity.partials.Timestamped
asDiscordTimestamp, parseTimestamp
-
Method Details
-
position
@CheckReturnValue int position()- Returns:
- The position of the channel.
-
overrides
- Returns:
- The permission overrides set on this channel. Will never be
null
, but may be empty.
-
isDM
@CheckReturnValue default boolean isDM()- Specified by:
isDM
in interfaceChannel
- Returns:
- Whether or not this channel is a DM; see
Channel.isUserDM()
andChannel.isGroupDM()
for more.
-
isGroupDM
@CheckReturnValue default boolean isGroupDM() -
isUserDM
default boolean isUserDM() -
isGuild
@CheckReturnValue default boolean isGuild() -
createInvite
@Nonnull @CheckReturnValue default io.reactivex.rxjava3.core.Single<CreatedInvite> createInvite(@Nullable InviteCreateOptions options, @Nullable String reason) Creates a new invite to this channel.- Parameters:
options
- The options to set on the invite.reason
- The reason that will be visible in audit log- Returns:
- A Observable that completes when the invite is created.
-
createInvite
@Nonnull @CheckReturnValue default io.reactivex.rxjava3.core.Single<CreatedInvite> createInvite(@Nullable InviteCreateOptions options) Creates a new invite to this channel.- Parameters:
options
- The options to set on the invite.- Returns:
- A Observable that completes when the invite is created.
-
createInvite
Creates a new invite to this channel.- Returns:
- A Observable that completes when the invite is created.
-
fetchInvites
@Nonnull @CheckReturnValue default io.reactivex.rxjava3.core.Observable<CreatedInvite> fetchInvites()The list of all invites to this channel. Will never benull
, but may be empty.- Returns:
- A Observable that completes when the invite is created.
-
edit
Edit this channel.- Returns:
- A channel editor that can complete the editing.
-
delete
Description copied from interface:Channel
Deletes the channel. This operation cannot be undone.
-