class BaseGuildEmoji

extends

Emoji
export class BaseGuildEmoji extends Emoji

Parent class for GuildEmoji and GuildPreviewEmoji.

Constructors

constructor(
client: Client<true>
)

Constructs a new instance of the BaseGuildEmoji class

optional
animated? : boolean

Whether or not the emoji is animated

available : boolean | null

Whether this emoji is available

readonly
client : Client

The client that instantiated this

readonly
createdAt : Date

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

readonly
createdTimestamp : number

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

The guild this emoji is a part of

The emoji's id

readonly
identifier : string

The identifier of this emoji, used for message reactions

managed : boolean | null

Whether this emoji is managed by an external service

optional
name? : string

The emoji's name

requiresColons : boolean | null

Whether or not this emoji requires colons surrounding it

deprecatedreadonly
url : string

Returns a URL for the emoji.

imageURL() : string

Returns a URL for 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