Package discord4j.core.object.entity
Class Sticker
- java.lang.Object
-
- discord4j.core.object.entity.PartialSticker
-
- discord4j.core.object.entity.Sticker
-
- All Implemented Interfaces:
DiscordObject
,Entity
- Direct Known Subclasses:
GuildSticker
public class Sticker extends PartialSticker
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Sticker.Format
The format of a sticker.static class
Sticker.Type
The type of sticker.
-
Field Summary
-
Fields inherited from class discord4j.core.object.entity.PartialSticker
gateway
-
-
Constructor Summary
Constructors Constructor Description Sticker(GatewayDiscordClient gateway, discord4j.discordjson.json.StickerData data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description discord4j.discordjson.json.StickerData
getData()
Gets the data of the sticker.Optional<String>
getDescription()
Gets the description of the sticker, if present.Optional<Snowflake>
getPackId()
Gets the ID of the pack the sticker is from, if present.List<String>
getTags()
Gets the list of tags for the sticker.Sticker.Type
getType()
Gets the type of sticker.boolean
isAvailable()
Gets whether this sticker is available for use.-
Methods inherited from class discord4j.core.object.entity.PartialSticker
getClient, getFormatType, getId, getImageUrl, getName, getStickerData
-
-
-
-
Constructor Detail
-
Sticker
public Sticker(GatewayDiscordClient gateway, discord4j.discordjson.json.StickerData data)
-
-
Method Detail
-
getData
public discord4j.discordjson.json.StickerData getData()
Gets the data of the sticker.- Returns:
- The data of the sticker.
-
getPackId
public Optional<Snowflake> getPackId()
Gets the ID of the pack the sticker is from, if present.- Returns:
- The ID of the pack the sticker is from, if present.
-
getDescription
public Optional<String> getDescription()
Gets the description of the sticker, if present.- Returns:
- The description of the sticker, if present.
-
getTags
public List<String> getTags()
Gets the list of tags for the sticker.- Returns:
- The list of tags for the sticker.
-
isAvailable
public boolean isAvailable()
Gets whether this sticker is available for use.- Returns:
true
if this sticker is available,false
otherwise (due to loss of Server Boosts for example).
-
getType
public Sticker.Type getType()
Gets the type of sticker.- Returns:
- The type of sticker.
-
-