Class: BaseGuildEmoji

BaseGuildEmoji

Parent class for GuildEmoji and GuildPreviewEmoji.

Constructor

new BaseGuildEmoji()

Source:

Extends

Members

(private) _roles :Array.<Snowflake>

Array of role ids this emoji is active for
Type:
Source:

animated :boolean

Whether this emoji is animated
Type:
  • boolean
Overrides:
Source:

(readonly) client :Client

The client that instantiated this
Type:
Overrides:
Source:

(readonly, nullable) createdAt :Date

The time the emoji was created at, or null if unicode
Type:
  • Date
Overrides:
Source:

(readonly, nullable) createdTimestamp :number

The timestamp the emoji was created at, or null if unicode
Type:
  • number
Overrides:
Source:

deleted :boolean

Whether this emoji has been deleted
Type:
  • boolean
Overrides:
Source:

guild :Guild|GuildPreview

The guild this emoji is a part of
Type:
Source:

(nullable) id :Snowflake

The ID of this emoji
Type:
Overrides:
Source:

(readonly) identifier :string

The identifier of this emoji, used for message reactions
Type:
  • string
Overrides:
Source:

name :string

The name of this emoji
Type:
  • string
Overrides:
Source:

(readonly, nullable) url :string

The URL to the emoji file if its a custom emoji
Type:
  • string
Overrides:
Source:

Methods

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.
Overrides:
Source:
Returns:
Type
string
Examples
// Send a custom emoji from a guild:
const emoji = guild.emojis.cache.first();
msg.reply(`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}`);