GuildPreviewEmoji
classe · Source
Represents an instance of an emoji belonging to a public guild obtained through Discord's preview endpoint.
Extends: BaseGuildEmoji
Properties
guild
The public guild this emoji is part of Source
roles
The roles this emoji is active for Source
requiresColons
Whether or not this emoji requires colons surrounding it Source
managed
Whether this emoji is managed by an external service Source
available
Whether this emoji is available Source
animated
Whether or not the emoji is animated Source
name
The emoji's name Source
id
The emoji's id Source
deleted
Whether or not the structure has been deleted Source
identifier
The identifier of this emoji, used for message reactions Source
url
The URL to the emoji file if it's a custom emoji Source
createdTimestamp
The timestamp the emoji was created at, or null if unicode Source
createdAt
The time the emoji was created at, or null if unicode Source
client
The client that instantiated this Source
Methods
toString
When concatenated with a string, this automatically returns the text required to form a graphical emoji on Discord instead of the Emoji object. Returns: string
// 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}`);