Class

GuildEmoji

Represents a custom emoji in a guild.

Extends Base

Constructor

new GuildEmoji(client: Client, data: APIEmoji & { guild_id?: string }, guildId: string)
ParamTypeDescription
clientClient
dataAPIEmoji & { guild_id?: string }

API emoji from GET /guilds/{id}/emojis or guild emoji events

guildIdstring

Properties

animated: boolean (readonly)
client: Client (readonly)
createdAt: Date (readonly)

Date when this emoji was created, derived from its snowflake ID.

createdTimestamp: number (readonly)

Unix timestamp (ms) when this emoji was created, derived from its snowflake ID.

guildId: string (readonly)
id: string (readonly)
identifier: string (readonly)

Emoji identifier for use in reactions: `name:id` (or `a:name:id` when animated).

name: string
url: string (readonly)

CDN URL for this emoji image.

Methods

delete(): Promise<void>

Delete this emoji. Requires Manage Emojis and Stickers permission.

edit(options: { name: string; }): Promise<GuildEmoji>

Edit this emoji's name. Requires Manage Emojis and Stickers permission.

ParamTypeDescription
options{ name: string; }
toString(): string

Renders this emoji for use in message content: `<:name:id>` (or `<a:name:id>` when animated).