GuildPreviewEmoji

export class GuildPreviewEmoji extends BaseGuildEmoji
export class GuildPreviewEmoji extends BaseGuildEmoji
Represents an instance of an emoji belonging to a public guild obtained through Discord's preview endpoint.
animated?:boolean
Whether or not the emoji is animated
available?:boolean
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 public guild this emoji is part of
The emoji's id
Readonly
identifier:string
The identifier of this emoji, used for message reactions
managed?:boolean
Whether this emoji is managed by an external service
name?:string
The emoji's name
requiresColons?:boolean
Whether or not this emoji requires colons surrounding it
roles:Snowflake[]
The roles this emoji is active for
Readonly
url:string
Returns a URL for the emoji.
imageURL(options?):string
Returns a URL for the emoji.
NameTypeOptionalDescription
optionsBaseImageURLOptionsYesOptions for the image URL
Inherited from BaseGuildEmoji
toJSON():unknown
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.
Example
// Send a custom emoji from a guild:
const emoji = guild.emojis.cache.first();
msg.channel.send(`Hello! ${emoji}`);
// Send a custom emoji from a guild:
const emoji = guild.emojis.cache.first();
msg.channel.send(`Hello! ${emoji}`);
Example
// 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}`);
// 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