class GuildEmoji

export class GuildEmoji extends BaseGuildEmoji

Represents a custom emoji.

optional
animated? : boolean

Whether or not the emoji is animated

author : User | null

The user who created this emoji

optional
available? : boolean

Whether this emoji is available

readonly
client : Client

The client that instantiated this

readonlyoptional
createdAt? : Date

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

readonlyoptional
createdTimestamp? : number

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

readonly
deletable : boolean

Whether the emoji is deletable by the client user

guild : Guild

The guild this emoji is part of

optional
id? : Snowflake

The emoji's id

readonly
identifier : string

The identifier of this emoji, used for message reactions

optional
managed? : boolean

Whether this emoji is managed by an external service

optional
name? : string

The emoji's name

optional
requiresColons? : boolean

Whether or not this emoji requires colons surrounding it

readonly
roles : GuildEmojiRoleManager

A manager for roles this emoji is active for.

readonly
url : string

Returns a URL for the emoji.

delete(
reason?: string
) : Promise<GuildEmoji>

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

Returns a URL for the emoji.

Inherited from: BaseGuildEmoji

setName(
name: string
reason?: string
) : Promise<GuildEmoji>

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