Emoji
Emoji ⇐ Base
Section titled “Emoji ⇐ Base”Represents an Emoji object.
Kind: global class
Extends: Base
- Emoji ⇐
Base- new Emoji([data], guildId, client)
- .guild ⇒
- .fetch(options) ⇒
Promise - .edit(options) ⇒
Promise - .setName(name, reason) ⇒
Promise - .setRoles(roles, reason) ⇒
Promise - .delete(reason) ⇒
Promise.<void> - .imageURL(options) ⇒
string - .equals(emoji) ⇒
boolean
new Emoji([data], guildId, client)
Section titled “new Emoji([data], guildId, client)”Constructs a new instance of the GuildEmoji class.
Returns: GuildEmoji - - The newly created GuildEmoji instance.
| Param | Type | Description |
|---|---|---|
| [data] | Object | The data object containing the emoji information. |
| guildId | string | The ID of the guild that the emoji belongs to. |
| client | Client | The client instance. |
emoji.guild ⇒
Section titled “emoji.guild ⇒”Get the guild object associated with this guildId.
Kind: instance property of Emoji
Returns: The guild object.
emoji.fetch(options) ⇒ Promise
Section titled “emoji.fetch(options) ⇒ Promise”Fetches emojis from the guild.
Kind: instance method of Emoji
Returns: Promise - A promise that resolves to the fetched emojis.
| Param | Type | Description |
|---|---|---|
| options | Object | Optional parameters for the fetch operation. |
emoji.edit(options) ⇒ Promise
Section titled “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.
| Param | Type | Description |
|---|---|---|
| options | Object | The options to update the emoji with. |
emoji.setName(name, reason) ⇒ Promise
Section titled “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.
| Param | Type | Description |
|---|---|---|
| name | string | The new name to set. |
| reason | string | The reason for setting the new name. |
emoji.setRoles(roles, reason) ⇒ Promise
Section titled “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.
| Param | Type | Description |
|---|---|---|
| roles | Array | The roles to set. |
| reason | string | The reason for setting the roles. |
emoji.delete(reason) ⇒ Promise.<void>
Section titled “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.
| Param | Type | Description |
|---|---|---|
| reason | string | The reason for deleting the emoji. |
emoji.imageURL(options) ⇒ string
Section titled “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.
| Param | Type | Description |
|---|---|---|
| options | Object | The options for generating the URL. |
| options.size | number | The desired size of the image. |
| options.format | string | The desired format of the image. |
| options.quality | number | The desired quality of the image. |
emoji.equals(emoji) ⇒ boolean
Section titled “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.
| Param | Type | Description |
|---|---|---|
| emoji | Emoji | The object to compare with this Emoji. |