Interface CustomEmoji

    • Method Detail

      • getImage

        Icon getImage​()
        Gets the image of the emoji.
        Returns:
        The image of the emoji.
      • getMentionTag

        default String getMentionTag​()
        Description copied from interface: Mentionable
        Gets the tag used to mention the entity.
        Specified by:
        getMentionTag in interface Mentionable
        Returns:
        The tag used to mention the entity.
      • asUnicodeEmoji

        default Optional<String> asUnicodeEmoji​()
        Description copied from interface: Emoji
        Gets the emoji as unicode emoji.
        Specified by:
        asUnicodeEmoji in interface Emoji
        Returns:
        The emoji as unicode emoji.
      • asCustomEmoji

        default Optional<CustomEmoji> asCustomEmoji​()
        Description copied from interface: Emoji
        Gets the emoji as custom emoji.
        Specified by:
        asCustomEmoji in interface Emoji
        Returns:
        The emoji as custom emoji.
      • getCurrentCachedInstance

        default Optional<KnownCustomEmoji> getCurrentCachedInstance​()
        Description copied from interface: UpdatableFromCache
        Gets an updated instance of this entity from the cache. This is for example necessary if an instance got invalid by a reconnect to Discord which invalidates all existing instances which means they do not get any further updates from Discord applied. Due to that, references to instances should usually not be held for an extended period of time. If they are, this method can be used to retrieve the current instance from the cache, that gets updates from Discord, in case this one was invalidated.

        This method returns the currently cached entity, or an empty Optional if the entity is not cached any longer, for example because it was deleted or the message was thrown out of the cache.

        Specified by:
        getCurrentCachedInstance in interface UpdatableFromCache<KnownCustomEmoji>
        Returns:
        The current cached instance.