Preview deployment

class ApplicationEmoji

extends

Emoji
export class ApplicationEmoji extends Emoji

Represents a custom emoji.

animated : boolean | null

Whether or not the emoji is animated

Inherited from: Emoji

application : ClientApplication

The application this emoji originates from

author : User | null

The user who created this emoji

readonly
client : Client<true>

The client that instantiated this

Inherited from: Base

readonly
createdAt : Date | null

The time the emoji was created at, or null if unicode

Inherited from: Emoji

readonly
createdTimestamp : number | null

The timestamp the emoji was created at, or null if unicode

Inherited from: Emoji

The emoji's id

readonly
identifier : string

The identifier of this emoji, used for message reactions

Inherited from: Emoji

managed : boolean | null

Whether this emoji is managed by an external service

name : string | null

The emoji's name

Inherited from: Emoji

requiresColons : boolean | null

Whether or not this emoji requires colons surrounding it

deprecatedreadonly
url : string | null

Returns a URL for the emoji or null if this is not a custom emoji.

Inherited from: Emoji

Deletes the emoji.

Edits the emoji.

Examples:
// Edit an emoji
emoji.edit({ name: 'newemoji' })
  .then(emoji => console.log(`Edited emoji ${emoji}`))
  .catch(console.error);

equals() : boolean

Whether this emoji is the same as another one.

fetchAuthor() : Promise<User>

Fetches the author for this emoji

imageURL() : string | null

Returns a URL for the emoji or null if this is not a custom emoji.

Inherited from: Emoji

setName(
name: string
) : Promise<ApplicationEmoji>

Sets the name of the emoji.

toJSON() : unknown

Inherited from: Emoji

toString() : string

When concatenated with a string, this automatically returns the text required to form a graphical emoji on Discord instead of the Emoji object.

Examples:
// Send a custom emoji from a guild:
const emoji = guild.emojis.cache.first();
msg.channel.send(`Hello! ${emoji}`);
// Send the emoji used in a reaction to the channel the reaction is part of
reaction.message.channel.send(`The emoji used was: ${reaction.emoji}`);

Inherited from: Emoji

valueOf() : string

Inherited from: Base