Class CustomEmojiImpl
java.lang.Object
com.mewna.catnip.entity.impl.misc.CustomEmojiImpl
- All Implemented Interfaces:
Entity
,Emoji
,Emoji.CustomEmoji
,GuildEntity
,HasGuild
,HasNullableName
,Snowflake
,Timestamped
,RequiresCatnip
- Since:
- 9/5/18.
- Author:
- natanbc
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mewna.catnip.entity.misc.Emoji
Emoji.ActivityEmoji, Emoji.CustomEmoji, Emoji.UnicodeEmoji
Nested classes/interfaces inherited from interface com.mewna.catnip.entity.partials.Timestamped
Timestamped.TimestampStyle
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
animated()
Whether this emoji is animated.animated
(boolean animated) builder()
catnip()
Returns the catnip instance associated with this entity.void
boolean
long
ID of guild that owns this emoji, or0
if it has no guild.guildIdAsLong
(long guildIdAsLong) int
hashCode()
long
idAsLong()
The ID of this snowflake, as a long.idAsLong
(long idAsLong) boolean
managed()
Whether this emoji is managed.managed
(boolean managed) name()
boolean
Whether this emoji must be wrapped in colons.requiresColons
(boolean requiresColons) roles()
Roles that are allowed to use this emoji.toString()
user()
User who uploaded this emoji.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.mewna.catnip.entity.misc.Emoji.CustomEmoji
custom, forMessage, forReaction, guild, guildId, id, is
Methods inherited from interface com.mewna.catnip.entity.partials.Snowflake
creationTime, creationTimestamp
Methods inherited from interface com.mewna.catnip.entity.partials.Timestamped
asDiscordTimestamp, parseTimestamp
-
Constructor Details
-
CustomEmojiImpl
public CustomEmojiImpl() -
CustomEmojiImpl
-
-
Method Details
-
catnip
- Specified by:
catnip
in interfaceRequiresCatnip
-
hashCode
public int hashCode() -
equals
-
toString
-
builder
-
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. -
guildIdAsLong
public long guildIdAsLong()Description copied from interface:Emoji.CustomEmoji
ID of guild that owns this emoji, or0
if it has no guild.NOTE: This may be null in the case of a reaction, because the data may not be available to get the id for the emoji!
- Specified by:
guildIdAsLong
in interfaceEmoji.CustomEmoji
- Specified by:
guildIdAsLong
in interfaceHasGuild
- Returns:
- Long representing the ID.
-
name
Description copied from interface:Emoji
Name of this emoji, if it'scustom
, or it'sunicode
value.
This may be null in the case of reactions.- Specified by:
name
in interfaceEmoji
- Specified by:
name
in interfaceHasNullableName
- Returns:
- String representing the name or unicode value.
-
roles
Description copied from interface:Emoji
Roles that are allowed to use this emoji. If empty, all users can use it.
Always empty forunicode
emoji. -
user
Description copied from interface:Emoji
User who uploaded this emoji.
Always null forunicode
emoji. -
requiresColons
public boolean requiresColons()Description copied from interface:Emoji
Whether this emoji must be wrapped in colons.- Specified by:
requiresColons
in interfaceEmoji
- Returns:
- True if it should be wrapped in colons, false otherwise.
-
managed
public boolean managed()Description copied from interface:Emoji
Whether this emoji is managed.
Always false forunicode
emoji. -
animated
public boolean animated()Description copied from interface:Emoji
Whether this emoji is animated.
Always false forunicode
emoji. -
idAsLong
- Returns:
this
.
-
guildIdAsLong
- Returns:
this
.
-
name
- Returns:
this
.
-
roles
- Returns:
this
.
-
user
- Returns:
this
.
-
requiresColons
- Returns:
this
.
-
managed
- Returns:
this
.
-
animated
- Returns:
this
.
-