class GuildEmoji
extends
BaseGuildEmojiexport class GuildEmoji extends BaseGuildEmoji
Represents a custom emoji.
optionalboolean animated? :
Whether or not the emoji is animated
optionalboolean available? :
Whether this emoji is available
readonlyClient client :
The client that instantiated this
readonlyoptionalDate createdAt? :
The time the emoji was created at, or null if unicode
readonlyoptionalnumber createdTimestamp? :
The timestamp the emoji was created at, or null if unicode
readonlyboolean deletable :
Whether the emoji is deletable by the client user
Guild guild :
The guild this emoji is part of
optionalSnowflake id? :
The emoji's id
readonlystring identifier :
The identifier of this emoji, used for message reactions
optionalboolean managed? :
Whether this emoji is managed by an external service
optionalstring name? :
The emoji's name
optionalboolean requiresColons? :
Whether or not this emoji requires colons surrounding it
readonlyGuildEmojiRoleManager roles :
A manager for roles this emoji is active for.
readonlystring url :
Returns a URL for the emoji.
deletereason?: string) : Promise<GuildEmoji> (
Deletes the emoji.
editoptions: GuildEmojiEditOptions) : Promise<GuildEmoji> (
Edits the emoji.
// Edit an emoji
emoji.edit({ name: 'newemoji' })
.then(emoji => console.log(`Edited emoji ${emoji}`))
.catch(console.error);
equalsother: GuildEmoji | unknown) : boolean (
Whether this emoji is the same as another one.
imageURLoptions?: BaseImageURLOptions) : string (
Returns a URL for the emoji.
Inherited from: BaseGuildEmoji
setName) : Promise<GuildEmoji> (
Sets the name of the emoji.
toStringstring () :
When concatenated with a string, this automatically returns the text required to form a graphical emoji on Discord instead of the Emoji object.
// 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