Package net.dv8tion.jda.api.entities
Class MessageSticker
- java.lang.Object
-
- net.dv8tion.jda.api.entities.MessageSticker
-
- All Implemented Interfaces:
ISnowflake
public class MessageSticker extends Object implements ISnowflake
An object representing a sticker in a Discord message.- See Also:
Message.getStickers()
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMessageSticker.StickerFormat
-
Field Summary
Fields Modifier and Type Field Description static StringASSET_URLTemplate forgetAssetUrl()
-
Constructor Summary
Constructors Constructor Description MessageSticker(long id, String name, String description, long packId, String asset, String previewAsset, MessageSticker.StickerFormat formatType, Set<String> tags)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAssetHash()The Discord hash-id of the sticker.StringgetAssetUrl()The url of the sticker asset.StringgetDescription()The description of the sticker.MessageSticker.StickerFormatgetFormatType()TheFormatof the sticker.longgetIdLong()The Snowflake id of this entity.StringgetName()The name of the sticker.StringgetPackId()The ID of the pack the sticker is from.longgetPackIdLong()The ID of the pack the sticker is from.Set<String>getTags()Set of tags of the sticker.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getTimeCreated
-
-
-
-
Field Detail
-
ASSET_URL
public static final String ASSET_URL
Template forgetAssetUrl()- See Also:
- Constant Field Values
-
-
Method Detail
-
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.
-
getDescription
@Nonnull public String getDescription()
The description of the sticker.- Returns:
- the description of the sticker
-
getPackId
@Nonnull public String getPackId()
The ID of the pack the sticker is from.- Returns:
- the ID of the pack the sticker is from
-
getPackIdLong
public long getPackIdLong()
The ID of the pack the sticker is from.- Returns:
- the ID of the pack the sticker is from
-
getAssetHash
@Nonnull public String getAssetHash()
The Discord hash-id of the sticker. This represents the actual asset file in the CDN for the sticker.
The URL for fetching sticker assets is currently private.- Returns:
- the Discord hash-id of the sticker
-
getAssetUrl
@Nonnull public String getAssetUrl()
The url of the sticker asset.- Returns:
- the url of the sticker
- Throws:
IllegalStateException- If theStickerFormatof this sticker isUNKNOWN
-
getFormatType
@Nonnull public MessageSticker.StickerFormat getFormatType()
TheFormatof the sticker.- Returns:
- the format of the sticker
-
-