Class RestEmoji

java.lang.Object
discord4j.rest.entity.RestEmoji

public class RestEmoji extends Object
Represents a guild emoji entity in Discord.
  • Method Details

    • create

      public static RestEmoji create(RestClient restClient, Snowflake guildId, Snowflake id)
      Create a RestEmoji with the given parameters. This method does not perform any API request.
      Parameters:
      restClient - REST API resources
      guildId - the ID of the guild this emoji belongs to
      id - the ID of this member
      Returns:
      a RestEmoji represented by the given parameters.
    • getGuildId

      public Snowflake getGuildId()
      Returns the ID of the guild this emoji belongs to.
      Returns:
      The ID of the guild this emoji belongs to.
    • getId

      public Snowflake getId()
      Returns the ID of this emoji.
      Returns:
      The ID of this emoji
    • guild

      public RestGuild guild()
      Return this emoji's parent RestGuild. This method does not perform any API request.
      Returns:
      the parent RestGuild of this guild emoji.
    • getData

      public Mono<discord4j.discordjson.json.EmojiData> getData()
      Retrieve this guild emoji's data upon subscription.
      Returns:
      a Mono where, upon successful completion, emits the EmojiData belonging to this entity. If an error is received, it is emitted through the Mono.
    • modify

      public Mono<discord4j.discordjson.json.EmojiData> modify(discord4j.discordjson.json.GuildEmojiModifyRequest request, @Nullable String reason)
      Modify this guild emoji. Requires the Permission.MANAGE_EMOJIS permission. Returns the updated emoji object on success.
      Parameters:
      request - the guild emoji modify request
      reason - an optional reason for the audit log
      Returns:
      a Mono where, upon subscription, emits the updated EmojiData on success. If an error is received, it is emitted through the Mono.
    • delete

      public Mono<Void> delete(@Nullable String reason)
      Delete this guild emoji. Requires the Permission.MANAGE_EMOJIS permission. Returns empty on success.
      Parameters:
      reason - an optional reason for the audit log
      Returns:
      a Mono where, upon subscription, emits a complete signal on success. If an error is received, it is emitted through the Mono.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object