Package discord4j.rest.entity
Class RestEmoji
java.lang.Object
discord4j.rest.entity.RestEmoji
Represents a guild emoji entity in Discord.
-
Method Summary
Modifier and TypeMethodDescriptionstatic RestEmojicreate(RestClient restClient, Snowflake guildId, Snowflake id) Create aRestEmojiwith the given parameters.Delete this guild emoji.booleanMono<discord4j.discordjson.json.EmojiData>getData()Retrieve this guild emoji's data upon subscription.Returns the ID of the guild this emoji belongs to.getId()Returns the ID of this emoji.guild()Return this emoji's parentRestGuild.inthashCode()Mono<discord4j.discordjson.json.EmojiData>Modify this guild emoji.
-
Method Details
-
create
Create aRestEmojiwith the given parameters. This method does not perform any API request.- Parameters:
restClient- REST API resourcesguildId- the ID of the guild this emoji belongs toid- the ID of this member- Returns:
- a
RestEmojirepresented by the given parameters.
-
getGuildId
Returns the ID of the guild this emoji belongs to.- Returns:
- The ID of the guild this emoji belongs to.
-
getId
Returns the ID of this emoji.- Returns:
- The ID of this emoji
-
guild
Return this emoji's parentRestGuild. This method does not perform any API request.- Returns:
- the parent
RestGuildof this guild emoji.
-
getData
Retrieve this guild emoji's data upon subscription.- Returns:
- a
Monowhere, upon successful completion, emits theEmojiDatabelonging to this entity. If an error is received, it is emitted through theMono.
-
modify
public Mono<discord4j.discordjson.json.EmojiData> modify(discord4j.discordjson.json.GuildEmojiModifyRequest request, @Nullable String reason) Modify this guild emoji. Requires thePermission.MANAGE_EMOJISpermission. Returns the updated emoji object on success.- Parameters:
request- the guild emoji modify requestreason- an optional reason for the audit log- Returns:
- a
Monowhere, upon subscription, emits the updatedEmojiDataon success. If an error is received, it is emitted through theMono.
-
delete
Delete this guild emoji. Requires thePermission.MANAGE_EMOJISpermission. 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.
-
equals
-
hashCode
public int hashCode()
-