Class TextChannelImpl
java.lang.Object
com.mewna.catnip.entity.impl.channel.TextChannelImpl
- All Implemented Interfaces:
Channel
,GuildChannel
,MessageChannel
,TextChannel
,Entity
,GuildEntity
,HasGuild
,HasName
,HasParentChannel
,Mentionable
,Snowflake
,Timestamped
,RequiresCatnip
- 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
-
Constructor Summary
ConstructorDescriptionTextChannelImpl
(Catnip catnip, long idAsLong, String name, long guildIdAsLong, int position, long parentIdAsLong, List<PermissionOverride> overrides, String topic, boolean nsfw, int rateLimitPerUser) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
catnip()
Returns the catnip instance associated with this entity.void
boolean
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) name()
boolean
nsfw()
nsfw
(boolean nsfw) overrides
(List<PermissionOverride> overrides) long
parentIdAsLong
(long parentIdAsLong) int
position()
position
(int position) int
The slowmode set on this channel.rateLimitPerUser
(int rateLimitPerUser) topic()
The channel's topic.toString()
type()
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, isGuildMessageChannel, 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.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
Methods inherited from interface com.mewna.catnip.entity.channel.TextChannel
asMention, fetchWebhooks, isCategory, isNews, isText, isVoice
Methods inherited from interface com.mewna.catnip.entity.partials.Timestamped
asDiscordTimestamp, parseTimestamp
-
Constructor Details
-
TextChannelImpl
public TextChannelImpl() -
TextChannelImpl
public TextChannelImpl(Catnip catnip, long idAsLong, String name, long guildIdAsLong, int position, long parentIdAsLong, List<PermissionOverride> overrides, String topic, boolean nsfw, int rateLimitPerUser)
-
-
Method Details
-
catnip
- Specified by:
catnip
in interfaceRequiresCatnip
-
hashCode
public int hashCode() -
equals
-
toString
-
builder
-
type
-
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.
-
topic
Description copied from interface:TextChannel
The channel's topic. Shown at the top of the channel. May benull
.- Specified by:
topic
in interfaceTextChannel
- Returns:
- The channel's topic.
-
nsfw
public boolean nsfw()- Specified by:
nsfw
in interfaceTextChannel
- Returns:
- Whether or not this channel has been marked as nsfw.
-
rateLimitPerUser
public 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.
-
idAsLong
- Returns:
this
.
-
name
- Returns:
this
.
-
guildIdAsLong
- Returns:
this
.
-
position
- Returns:
this
.
-
parentIdAsLong
- Returns:
this
.
-
overrides
- Returns:
this
.
-
topic
- Returns:
this
.
-
nsfw
- Returns:
this
.
-
rateLimitPerUser
- Returns:
this
.
-