Package discord4j.rest.entity
Class RestSticker
- java.lang.Object
-
- discord4j.rest.entity.RestSticker
-
public class RestSticker extends Object
Represents a guild sticker entity in Discord.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RestStickercreate(RestClient restClient, Snowflake guildId, Snowflake id)Create aRestStickerwith the given parameters.Mono<Void>delete(String reason)Delete this guild sticker.booleanequals(Object o)Mono<discord4j.discordjson.json.StickerData>getData()Retrieve this guild sticker's data upon subscription.SnowflakegetGuildId()Returns the ID of the guild this sticker belongs to.SnowflakegetId()Returns the ID of this sticker.RestGuildguild()Return this sticker's parentRestGuild.inthashCode()Mono<discord4j.discordjson.json.StickerData>modify(discord4j.discordjson.json.GuildStickerModifyRequest request, String reason)Modify this guild sticker.
-
-
-
Method Detail
-
create
public static RestSticker create(RestClient restClient, Snowflake guildId, Snowflake id)
Create aRestStickerwith the given parameters. This method does not perform any API request.- Parameters:
restClient- REST API resourcesguildId- the ID of the guild this sticker belongs toid- the ID of this member- Returns:
- a
RestStickerrepresented 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 parentRestGuild. This method does not perform any API request.- Returns:
- the parent
RestGuildof this guild sticker.
-
getData
public Mono<discord4j.discordjson.json.StickerData> getData()
Retrieve this guild sticker's data upon subscription.- Returns:
- a
Monowhere, upon successful completion, emits theStickerDatabelonging to this entity. If an error is received, it is emitted through theMono.
-
modify
public Mono<discord4j.discordjson.json.StickerData> modify(discord4j.discordjson.json.GuildStickerModifyRequest request, @Nullable String reason)
Modify this guild sticker. Requires thePermission.MANAGE_EMOJIS_AND_STICKERSpermission. Returns the updated sticker object on success.- Parameters:
request- the guild sticker modify requestreason- an optional reason for the audit log- Returns:
- a
Monowhere, upon subscription, emits the updatedStickerDataon success. If an error is received, it is emitted through theMono.
-
delete
public Mono<Void> delete(@Nullable String reason)
Delete this guild sticker. Requires thePermission.MANAGE_EMOJIS_AND_STICKERSpermission. Returns empty on success.- Parameters:
reason- an optional reason for the audit log- Returns:
- a
Monowhere, upon subscription, emits a complete signal on success. If an error is received, it is emitted through theMono.
-
-