Skip to content

Emoji

Emoji ⇐ Base

Represents an Emoji object.

Kind: global class
Extends: Base

new Emoji([data], guildId, client)

Constructs a new instance of the GuildEmoji class.

Returns: GuildEmoji - - The newly created GuildEmoji instance.

ParamTypeDescription
[data]ObjectThe data object containing the emoji information.
guildIdstringThe ID of the guild that the emoji belongs to.
clientClientThe client instance.

emoji.guild ⇒

Get the guild object associated with this guildId.

Kind: instance property of Emoji
Returns: The guild object.

emoji.fetch(options) ⇒ Promise

Fetches emojis from the guild.

Kind: instance method of Emoji
Returns: Promise - A promise that resolves to the fetched emojis.

ParamTypeDescription
optionsObjectOptional parameters for the fetch operation.

emoji.edit(options) ⇒ Promise

Edits the current emoji with the provided options.

Kind: instance method of Emoji
Returns: Promise - A promise that resolves with the updated emoji.

ParamTypeDescription
optionsObjectThe options to update the emoji with.

emoji.setName(name, reason) ⇒ Promise

Sets the name and reason for an object.

Kind: instance method of Emoji
Returns: Promise - - A promise that resolves when the name and reason are successfully set.

ParamTypeDescription
namestringThe new name to set.
reasonstringThe reason for setting the new name.

emoji.setRoles(roles, reason) ⇒ Promise

Sets the roles for the current object.

Kind: instance method of Emoji
Returns: Promise - A promise that resolves when the roles are successfully set.

ParamTypeDescription
rolesArrayThe roles to set.
reasonstringThe reason for setting the roles.

emoji.delete(reason) ⇒ Promise.<void>

Deletes the emoji from the guild.

Kind: instance method of Emoji
Returns: Promise.<void> - - A promise that resolves when the emoji is deleted.

ParamTypeDescription
reasonstringThe reason for deleting the emoji.

emoji.imageURL(options) ⇒ string

Generates the URL for the image of this emoji.

Kind: instance method of Emoji
Returns: string - The URL of the image.

ParamTypeDescription
optionsObjectThe options for generating the URL.
options.sizenumberThe desired size of the image.
options.formatstringThe desired format of the image.
options.qualitynumberThe desired quality of the image.

emoji.equals(emoji) ⇒ boolean

Checks if the given object is equal to this Emoji object.

Kind: instance method of Emoji
Returns: boolean - True if the objects are equal, false otherwise.

ParamTypeDescription
emojiEmojiThe object to compare with this Emoji.