Interface CustomEmoji

All Superinterfaces:
Emoji, Formattable, IMentionable, ISnowflake, SerializableData
All Known Subinterfaces:

public interface CustomEmoji extends Emoji, IMentionable
Represents a minimal custom emoji.

This contains the most minimal representation of a custom emoji, via id and name.

This does not represent unicode emojis like they are used in the official client! The format :smiley: is a client-side alias which is replaced by the unicode emoji, not a custom emoji.

See Also:
  • Field Details

  • Method Details

    • getType

      @Nonnull default Emoji.Type getType()
      Description copied from interface: Emoji
      The Emoji.Type of this emoji.
      Specified by:
      getType in interface Emoji
      The Emoji.Type
    • isAnimated

      boolean isAnimated()
      Whether this emoji is animated.
      True, if this emoji is animated
    • getImageUrl

      @Nonnull default String getImageUrl()
      A String representation of the URL which leads to image displayed within the official Discord™ client when this emoji is used
      Discord CDN link to the emoji's image
    • getImage

      @Nonnull default ImageProxy getImage()
      Returns an ImageProxy for this emoji's image.
      Never-null ImageProxy of this emoji's image
      See Also:
    • getAsMention

      @Nonnull default String getAsMention()
      Usable representation of this emoji (used to display in the client just like mentions with a specific format)
      Emojis are used with the format <:getName():getId()>
      Specified by:
      getAsMention in interface IMentionable
      A usable String representation for this emoji
      See Also:
    • getFormatted

      @Nonnull default String getFormatted()
      Description copied from interface: Emoji
      Formatted string used in messages.
      For unicode emoji, this is simply Emoji.getName(). For custom emoji, this will be the mention markdown format <:name:id>.
      Specified by:
      getFormatted in interface Emoji
      The formatted message string
    • formatTo

      default void formatTo(Formatter formatter, int flags, int width, int precision)
      Specified by:
      formatTo in interface Emoji
      Specified by:
      formatTo in interface Formattable
      Specified by:
      formatTo in interface IMentionable