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:
  • Field Details

  • Constructor Details

  • Method Details

    • getIdLong

      public long getIdLong()
      Description copied from interface: ISnowflake
      The Snowflake id of this entity. This is unique to every entity and will never change.
      Specified by:
      getIdLong in interface ISnowflake
      Returns:
      Long containing the Id.
    • getName

      @Nonnull public String getName()
      The name of the sticker.
      Returns:
      the name of the sticker
    • getDescription

      @Nonnull public String 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

      @Nonnull public String 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

      @Nonnull public String getIconUrl()
      The url of the sticker image.
      Returns:
      The image url of the sticker
      Throws:
      IllegalStateException - If the StickerFormat of this sticker is UNKNOWN
    • getFormatType

      @Nonnull public MessageSticker.StickerFormat getFormatType()
      The Format of the sticker.
      Returns:
      the format of the sticker
    • getTags

      @Nonnull public Set<String> 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