Interface Emoji.CustomEmoji

All Superinterfaces:
Emoji, Entity, GuildEntity, HasGuild, HasNullableName, Snowflake, Timestamped
All Known Implementing Classes:
CustomEmojiImpl
Enclosing interface:
Emoji

public static interface Emoji.CustomEmoji extends Emoji, GuildEntity
  • Method Details

    • id

      @Nonnull @CheckReturnValue default String id()
      Description copied from interface: Emoji
      ID of this emoji, or null if it has no ID.
      Always null for unicode emoji.
      Specified by:
      id in interface Emoji
      Specified by:
      id in interface Snowflake
      Returns:
      String representing the ID.
    • guild

      @Nonnull @CheckReturnValue default io.reactivex.rxjava3.core.Maybe<Guild> guild()
      Guild that owns this emoji, or null if it has no guild.

      NOTE: This may be null in the case of a reaction, because the data may not be available to get the id for the emoji!

      Specified by:
      guild in interface GuildEntity
      Returns:
      String representing the ID.
    • guildId

      @Nullable @CheckReturnValue default String guildId()
      ID of guild that owns this emoji, or null if it has no guild.

      NOTE: This may be null in the case of a reaction, because the data may not be available to get the id for the emoji!

      Specified by:
      guildId in interface HasGuild
      Returns:
      String representing the ID.
    • guildIdAsLong

      @CheckReturnValue long guildIdAsLong()
      ID of guild that owns this emoji, or 0 if it has no guild.

      NOTE: This may be null in the case of a reaction, because the data may not be available to get the id for the emoji!

      Specified by:
      guildIdAsLong in interface HasGuild
      Returns:
      Long representing the ID.
    • custom

      @CheckReturnValue default boolean custom()
      Description copied from interface: Emoji
      Whether this emoji is custom.
      Specified by:
      custom in interface Emoji
      Returns:
      True if this emoji is custom, false otherwise.
    • forMessage

      @Nonnull @CheckReturnValue default String forMessage()
      Description copied from interface: Emoji
      A string that may be sent in a message and will render this emoji, if the user has permission to.
      Specified by:
      forMessage in interface Emoji
      Returns:
      A string that yields this emoji when inside a message.
    • forReaction

      @Nonnull @CheckReturnValue default String forReaction()
      Description copied from interface: Emoji
      A string that may be added as a reaction to a message, if the user has permission to.
      Specified by:
      forReaction in interface Emoji
      Returns:
      A string that yields this emoji when added as a reaction.
    • is

      @CheckReturnValue default boolean is(@Nonnull String emoji)
      Description copied from interface: Emoji
      Checks whether or not this emoji is the provided emoji string.
      If this emoji is unicode, it's name is compared for equality with the provided string.
      If this emoji is custom, the following checks, in order, are applied:
      Specified by:
      is in interface Emoji
      Parameters:
      emoji - Emoji string to compare against.
      Returns:
      True, if this emoji is equal to the provided string.