Class StageChannelImpl
java.lang.Object
com.mewna.catnip.entity.impl.channel.StageChannelImpl
- All Implemented Interfaces:
Channel
,GuildChannel
,MessageChannel
,StageChannel
,TextChannel
,VoiceChannel
,Entity
,GuildEntity
,HasGuild
,HasName
,HasParentChannel
,Mentionable
,Snowflake
,Timestamped
,RequiresCatnip
- Since:
- 11/26/21.
- Author:
- amy
-
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
-
Constructor Summary
ConstructorDescriptionStageChannelImpl
(Catnip catnip, long idAsLong, String name, long guildIdAsLong, int position, long parentIdAsLong, List<PermissionOverride> overrides, int bitrate, int userLimit) -
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Completable
addReaction
(String messageId, Emoji emoji) Add a reaction to the message with the given id in this channel.io.reactivex.rxjava3.core.Completable
addReaction
(String messageId, String emoji) Add a reaction to the message with the given id in this channel.int
bitrate()
bitrate
(int bitrate) builder()
io.reactivex.rxjava3.core.Completable
bulkRemoveReaction
(String messageId) Delete all reactions on the given messagecatnip()
Returns the catnip instance associated with this entity.void
io.reactivex.rxjava3.core.Completable
deleteMessage
(String messageId) Delete the message with the given id in this channel.io.reactivex.rxjava3.core.Completable
deleteMessage
(String messageId, String reason) Delete the message with the given id in this channel.io.reactivex.rxjava3.core.Completable
deleteOwnReaction
(String messageId, Emoji emoji) Delete your own reaction on the given message.io.reactivex.rxjava3.core.Completable
deleteOwnReaction
(String messageId, String emoji) Delete your own reaction on the given message.io.reactivex.rxjava3.core.Completable
deleteUserReaction
(String messageId, String userId, Emoji emoji) Delete a user's reaction on the given message.io.reactivex.rxjava3.core.Completable
deleteUserReaction
(String messageId, String userId, String emoji) Delete a user's reaction on the given message.io.reactivex.rxjava3.core.Single<Message>
editMessage
(String messageId, Embed embed) Edit the message with the given id in this channel to contain the specified embed.io.reactivex.rxjava3.core.Single<Message>
editMessage
(String messageId, Message message) Edit the message with the given id in this channel to contain the content and embed of the given message.io.reactivex.rxjava3.core.Single<Message>
editMessage
(String messageId, String content) Edit the message with the given id in this channel to contain the specified content.boolean
io.reactivex.rxjava3.core.Single<Message>
fetchMessage
(String messageId) Fetch the message with the given id from this channel.Fetch the history for the channel in a paginated way.io.reactivex.rxjava3.core.Observable<Webhook>
Fetch all webhooks on this channel.long
The id of the guild this entity is from.guildIdAsLong
(long guildIdAsLong) int
hashCode()
long
idAsLong()
The ID of this snowflake, as a long.idAsLong
(long idAsLong) boolean
name()
overrides
(List<PermissionOverride> overrides) long
parentIdAsLong
(long parentIdAsLong) int
position()
position
(int position) io.reactivex.rxjava3.core.Single<Message>
sendMessage
(Embed embed) Send a message to this channel with the specified embed.io.reactivex.rxjava3.core.Single<Message>
sendMessage
(Message message) Send a message to this channel.io.reactivex.rxjava3.core.Single<Message>
sendMessage
(MessageOptions options) Send a message to this channel with the specified options.io.reactivex.rxjava3.core.Single<Message>
sendMessage
(String content) Send a message to this channel with the specified content.toString()
io.reactivex.rxjava3.core.Completable
Trigger the "[user] is typing..." indicator for yourself in this channel.type()
int
userLimit
(int userLimit) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.mewna.catnip.entity.channel.Channel
asCategory, asDMChannel, asGroupDMChannel, asGuildChannel, asMessageChannel, asTextChannel, asUserDMChannel, asVoiceChannel, delete, isStore
Methods inherited from interface com.mewna.catnip.entity.channel.GuildChannel
createInvite, createInvite, createInvite, delete, edit, fetchInvites, isDM, isGroupDM, isGuild, isUserDM
Methods inherited from interface com.mewna.catnip.entity.partials.GuildEntity
guild
Methods inherited from interface com.mewna.catnip.entity.partials.HasParentChannel
parentId
Methods inherited from interface com.mewna.catnip.entity.partials.Snowflake
creationTime, creationTimestamp, id
Methods inherited from interface com.mewna.catnip.entity.channel.TextChannel
asMention, isNews
Methods inherited from interface com.mewna.catnip.entity.partials.Timestamped
asDiscordTimestamp, parseTimestamp
Methods inherited from interface com.mewna.catnip.entity.channel.VoiceChannel
isCategory, isText, isVoice, nsfw, openVoiceConnection, rateLimitPerUser, topic
-
Constructor Details
-
StageChannelImpl
public StageChannelImpl() -
StageChannelImpl
public StageChannelImpl(Catnip catnip, long idAsLong, String name, long guildIdAsLong, int position, long parentIdAsLong, List<PermissionOverride> overrides, int bitrate, int userLimit)
-
-
Method Details
-
catnip
- Specified by:
catnip
in interfaceRequiresCatnip
-
hashCode
public int hashCode() -
equals
-
toString
-
sendMessage
Description copied from interface:MessageChannel
Send a message to this channel with the specified content.- Specified by:
sendMessage
in interfaceMessageChannel
- Parameters:
content
- The text content to send.- Returns:
- A Observable that completes when the message is sent.
-
sendMessage
Description copied from interface:MessageChannel
Send a message to this channel with the specified embed.- Specified by:
sendMessage
in interfaceMessageChannel
- Parameters:
embed
- The embed to send- Returns:
- A Observable that completes when the message is sent.
-
sendMessage
Description copied from interface:MessageChannel
Send a message to this channel.- Specified by:
sendMessage
in interfaceMessageChannel
- Parameters:
message
- The message to send.- Returns:
- A Observable that completes when the message is sent.
-
sendMessage
@Nonnull public io.reactivex.rxjava3.core.Single<Message> sendMessage(@Nonnull MessageOptions options) Description copied from interface:MessageChannel
Send a message to this channel with the specified options.- Specified by:
sendMessage
in interfaceMessageChannel
- Parameters:
options
- The options for the message being sent.- Returns:
- A Observable that completes when the message is sent.
-
editMessage
@Nonnull public io.reactivex.rxjava3.core.Single<Message> editMessage(@Nonnull String messageId, @Nonnull String content) Description copied from interface:MessageChannel
Edit the message with the given id in this channel to contain the specified content.- Specified by:
editMessage
in interfaceMessageChannel
- Parameters:
messageId
- The id of the message to edit.content
- The new content to set on the message.- Returns:
- A Observable that completes when the message is edited.
-
editMessage
@Nonnull public io.reactivex.rxjava3.core.Single<Message> editMessage(@Nonnull String messageId, @Nonnull Embed embed) Description copied from interface:MessageChannel
Edit the message with the given id in this channel to contain the specified embed.- Specified by:
editMessage
in interfaceMessageChannel
- Parameters:
messageId
- The id of the message to edit.embed
- The new embed to be set on the message.- Returns:
- A Observable that completes when the message is edited.
-
editMessage
@Nonnull public io.reactivex.rxjava3.core.Single<Message> editMessage(@Nonnull String messageId, @Nonnull Message message) Description copied from interface:MessageChannel
Edit the message with the given id in this channel to contain the content and embed of the given message.- Specified by:
editMessage
in interfaceMessageChannel
- Parameters:
messageId
- The id of the message to edit.message
- The message to set as the new message.- Returns:
- A Observable that completes when the message is edited.
-
deleteMessage
@Nonnull public io.reactivex.rxjava3.core.Completable deleteMessage(@Nonnull String messageId, @Nullable String reason) Description copied from interface:MessageChannel
Delete the message with the given id in this channel.- Specified by:
deleteMessage
in interfaceMessageChannel
- Parameters:
messageId
- The id of the message to delete.reason
- The reason that will be displayed in audit log- Returns:
- A Observable that completes when the message is deleted.
-
deleteMessage
Description copied from interface:MessageChannel
Delete the message with the given id in this channel.- Specified by:
deleteMessage
in interfaceMessageChannel
- Parameters:
messageId
- The id of the message to delete.- Returns:
- A Observable that completes when the message is deleted.
-
addReaction
@Nonnull public io.reactivex.rxjava3.core.Completable addReaction(@Nonnull String messageId, @Nonnull String emoji) Description copied from interface:MessageChannel
Add a reaction to the message with the given id in this channel.- Specified by:
addReaction
in interfaceMessageChannel
- Parameters:
messageId
- The id of the message to add a reaction to.emoji
- The reaction to add.- Returns:
- A Observable that completes when the reaction is added.
-
addReaction
@Nonnull public io.reactivex.rxjava3.core.Completable addReaction(@Nonnull String messageId, @Nonnull Emoji emoji) Description copied from interface:MessageChannel
Add a reaction to the message with the given id in this channel.- Specified by:
addReaction
in interfaceMessageChannel
- Parameters:
messageId
- The id of the message to add a reaction to.emoji
- The reaction to add.- Returns:
- A Observable that completes when the reaction is added.
-
deleteOwnReaction
@Nonnull public io.reactivex.rxjava3.core.Completable deleteOwnReaction(@Nonnull String messageId, @Nonnull String emoji) Description copied from interface:MessageChannel
Delete your own reaction on the given message.- Specified by:
deleteOwnReaction
in interfaceMessageChannel
- Parameters:
messageId
- The id of the message to remove a reaction from.emoji
- The reaction to remove.- Returns:
- A Observable that completes when the reaction is removed.
-
deleteOwnReaction
@Nonnull public io.reactivex.rxjava3.core.Completable deleteOwnReaction(@Nonnull String messageId, @Nonnull Emoji emoji) Description copied from interface:MessageChannel
Delete your own reaction on the given message.- Specified by:
deleteOwnReaction
in interfaceMessageChannel
- Parameters:
messageId
- The id of the message to remove a reaction from.emoji
- The reaction to remove.- Returns:
- A Observable that completes when the reaction is removed.
-
deleteUserReaction
@Nonnull public io.reactivex.rxjava3.core.Completable deleteUserReaction(@Nonnull String messageId, @Nonnull String userId, @Nonnull String emoji) Description copied from interface:MessageChannel
Delete a user's reaction on the given message.- Specified by:
deleteUserReaction
in interfaceMessageChannel
- Parameters:
messageId
- The id of the message to remove a reaction from.userId
- The id of the user whose reaction is to be removed.emoji
- The reaction to remove.- Returns:
- A Observable that completes when the reaction is removed.
-
deleteUserReaction
@Nonnull public io.reactivex.rxjava3.core.Completable deleteUserReaction(@Nonnull String messageId, @Nonnull String userId, @Nonnull Emoji emoji) Description copied from interface:MessageChannel
Delete a user's reaction on the given message.- Specified by:
deleteUserReaction
in interfaceMessageChannel
- Parameters:
messageId
- The id of the message to remove a reaction from.userId
- The id of the user whose reaction is to be removed.emoji
- The reaction to remove.- Returns:
- A Observable that completes when the reaction is removed.
-
bulkRemoveReaction
Description copied from interface:MessageChannel
Delete all reactions on the given message- Specified by:
bulkRemoveReaction
in interfaceMessageChannel
- Parameters:
messageId
- The id of the message to remove all reactions from.- Returns:
- A Observable that completes when the reaction is removed.
-
triggerTypingIndicator
@Nonnull public io.reactivex.rxjava3.core.Completable triggerTypingIndicator()Description copied from interface:MessageChannel
Trigger the "[user] is typing..." indicator for yourself in this channel.- Specified by:
triggerTypingIndicator
in interfaceMessageChannel
- Returns:
- A Observable that completes when the typing indicator is triggered.
-
fetchMessage
Description copied from interface:MessageChannel
Fetch the message with the given id from this channel.- Specified by:
fetchMessage
in interfaceMessageChannel
- Parameters:
messageId
- The id of the message to fetch.- Returns:
- A Observable that completes when the message is fetched.
-
fetchMessages
Description copied from interface:MessageChannel
Fetch the history for the channel in a paginated way.- Specified by:
fetchMessages
in interfaceMessageChannel
- Returns:
- The paginator for channel history.
-
fetchWebhooks
Description copied from interface:TextChannel
Fetch all webhooks on this channel.- Specified by:
fetchWebhooks
in interfaceTextChannel
- Returns:
- A not-
null
, possibly-empty list of webhooks for this channel.
-
isGuildMessageChannel
public boolean isGuildMessageChannel()- Specified by:
isGuildMessageChannel
in interfaceChannel
- Returns:
- Whether or not this channel is part of a guild and can contain messages.
-
builder
-
type
- Specified by:
type
in interfaceChannel
- Specified by:
type
in interfaceStageChannel
- Returns:
- The type of this channel.
-
catnip
Description copied from interface:Entity
Returns the catnip instance associated with this entity. -
idAsLong
public long idAsLong()Description copied from interface:Snowflake
The ID of this snowflake, as a long. -
name
-
guildIdAsLong
public long guildIdAsLong()Description copied from interface:HasGuild
The id of the guild this entity is from.- Specified by:
guildIdAsLong
in interfaceHasGuild
- Returns:
- Long representing the guild ID.
-
position
public int position()- Specified by:
position
in interfaceGuildChannel
- Returns:
- The position of the channel.
-
parentIdAsLong
public long parentIdAsLong()- Specified by:
parentIdAsLong
in interfaceHasParentChannel
- Returns:
- The id of the
Category
that is the parent of this channel. A value of0
means no parent.
-
overrides
- Specified by:
overrides
in interfaceGuildChannel
- Returns:
- The permission overrides set on this channel. Will never be
null
, but may be empty.
-
bitrate
public int bitrate()- Specified by:
bitrate
in interfaceVoiceChannel
- Returns:
- The bitrate of this channel. Will be from 8 to 96.
-
userLimit
public int userLimit()- Specified by:
userLimit
in interfaceVoiceChannel
- Returns:
- The maximum number of users allowed in this voice channel at once.
-
idAsLong
- Returns:
this
.
-
name
- Returns:
this
.
-
guildIdAsLong
- Returns:
this
.
-
position
- Returns:
this
.
-
parentIdAsLong
- Returns:
this
.
-
overrides
- Returns:
this
.
-
bitrate
- Returns:
this
.
-
userLimit
- Returns:
this
.
-