Class RestSticker

java.lang.Object
discord4j.rest.entity.RestSticker

public class RestSticker extends Object
Represents a guild sticker entity in Discord.
  • Method Details

    • create

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

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

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

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

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

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

      public Mono<Void> delete(@Nullable String reason)
      Delete this guild sticker. Requires the Permission.MANAGE_EMOJIS_AND_STICKERS 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