Package net.dv8tion.jda.api.entities
Class MessageSticker
java.lang.Object
net.dv8tion.jda.api.entities.MessageSticker
- All Implemented Interfaces:
ISnowflake
An object representing a sticker in a Discord message.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMessageSticker(long id, String name, String description, long packId, MessageSticker.StickerFormat formatType, Set<String> tags) -
Method Summary
Modifier and TypeMethodDescriptionThe description of the sticker or empty String if the sticker doesn't have one.TheFormatof the sticker.The url of the sticker image.longThe Snowflake id of this entity.getName()The name of the sticker.The ID of the pack the sticker is from.longThe ID of the pack the sticker is from.getTags()Set of tags of the sticker.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getTimeCreated
-
Field Details
-
ICON_URL
Template forgetIconUrl()- See Also:
-
-
Constructor Details
-
MessageSticker
public MessageSticker(long id, String name, String description, long packId, MessageSticker.StickerFormat formatType, Set<String> tags)
-
-
Method Details
-
getIdLong
public long getIdLong()Description copied from interface:ISnowflakeThe Snowflake id of this entity. This is unique to every entity and will never change.- Specified by:
getIdLongin interfaceISnowflake- Returns:
- Long containing the Id.
-
getName
The name of the sticker.- Returns:
- the name of the sticker
-
getDescription
The description of the sticker or empty String if the sticker doesn't have one.- Returns:
- Possibly-empty String containing the description of the sticker
-
getPackId
The ID of the pack the sticker is from.If this sticker is from a guild, this will be the guild id instead.
- Returns:
- the ID of the pack the sticker is from
-
getPackIdLong
public long getPackIdLong()The ID of the pack the sticker is from.If this sticker is from a guild, this will be the guild id instead.
- Returns:
- the ID of the pack the sticker is from
-
getIconUrl
The url of the sticker image.- Returns:
- The image url of the sticker
- Throws:
IllegalStateException- If theStickerFormatof this sticker isUNKNOWN
-
getFormatType
TheFormatof the sticker.- Returns:
- the format of the sticker
-
getTags
Set of tags of the sticker. Tags can be used instead of the name of the sticker as aliases.- Returns:
- Possibly-empty unmodifiable Set of tags of the sticker
-