public class RestEmoji extends Object
| Modifier and Type | Method and Description |
|---|---|
static RestEmoji |
create(RestClient restClient,
Snowflake guildId,
Snowflake id)
Create a
RestEmoji with the given parameters. |
Mono<Void> |
delete(String reason)
Delete this guild emoji.
|
Mono<discord4j.discordjson.json.EmojiData> |
getData()
Retrieve this guild emoji's data upon subscription.
|
RestGuild |
guild()
Return this emoji's parent
RestGuild. |
Mono<discord4j.discordjson.json.EmojiData> |
modify(discord4j.discordjson.json.GuildEmojiModifyRequest request,
String reason)
Modify this guild emoji.
|
public static RestEmoji create(RestClient restClient, Snowflake guildId, Snowflake id)
RestEmoji with the given parameters. This method does not perform any API request.restClient - REST API resourcesguildId - the ID of the guild this emoji belongs toid - the ID of this memberRestEmoji represented by the given parameters.public RestGuild guild()
RestGuild. This method does not perform any API request.RestGuild of this guild emoji.public Mono<discord4j.discordjson.json.EmojiData> getData()
Mono where, upon successful completion, emits the EmojiData belonging to this entity.
If an error is received, it is emitted through the Mono.public Mono<discord4j.discordjson.json.EmojiData> modify(discord4j.discordjson.json.GuildEmojiModifyRequest request, @Nullable String reason)
Permission.MANAGE_EMOJIS permission. Returns the updated emoji
object on success.request - the guild emoji modify requestreason - an optional reason for the audit logMono where, upon subscription, emits the updated EmojiData on success. If an error
is received, it is emitted through the Mono.public Mono<Void> delete(@Nullable String reason)
Permission.MANAGE_EMOJIS permission. Returns empty on success.reason - an optional reason for the audit logMono where, upon subscription, emits a complete signal on success. If an error is received, it
is emitted through the Mono.