Emoji

Emoji

Represents an emoji.

Constructor

new Emoji(client, data, options)

Description:
  • Creates the structure for an emoji.

Source:
See:
Parameters:
Name Type Description
client Client

The client instance.

data Object

The raw emoji data from Discord.

options Object

The options for this emoji.

Properties
Name Type Attributes Description
guildId String

The id of the guild that the emoji belongs to.

nocache Boolean <nullable>

Whether this emoji should be cached or not.

Members

(readonly) animated :Boolean

Description:
  • Whether the emoji is animated.

Source:

Whether the emoji is animated.

Type:
  • Boolean

(readonly) available :Boolean

Description:
  • Whether the emoji is available.

Source:

Whether the emoji is available.

Type:
  • Boolean

(readonly, nullable) guild :Guild

Description:
  • The guild that this emoji belongs to.

Source:

The guild that this emoji belongs to.

Type:

(readonly) guildId :String

Description:
  • The id of the guild that this emoji belongs to.

Source:

The id of the guild that this emoji belongs to.

Type:
  • String

(readonly, nullable) id :String

Description:
  • The id of the emoji, if it is custom.

Source:

The id of the emoji, if it is custom.

Type:
  • String

(readonly) managed :Boolean

Description:
  • Whether the emoji is managed.

Source:

Whether the emoji is managed.

Type:
  • Boolean

(readonly) mention :String

Description:
  • The mention string for the emoji.

Source:

The mention string for the emoji.

Type:
  • String

(readonly) name :String

Description:
  • The name of the emoji.

Source:

The name of the emoji.

Type:
  • String

(readonly) requireColons :Boolean

Description:
  • Whether the emoji requires colons.

Source:

Whether the emoji requires colons.

Type:
  • Boolean

(readonly) url :String

Description:
  • The url for the emoji.

Source:

The url for the emoji.

Type:
  • String

Methods

(static) getMention(name, idnullable, animatednullable) → {String}

Description:
  • Returns the mention string for an emoji.

Source:
Parameters:
Name Type Attributes Description
name String

The name of the emoji.

id String <nullable>

The id of the emoji.

animated Boolean <nullable>

Whether the emoji is animated.

Returns:
Type
String

(static) shouldCache(gluonCacheOptions, guildCacheOptions) → {Boolean}

Description:
  • Determines whether the emoji should be cached.

Source:
Parameters:
Name Type Description
gluonCacheOptions GluonCacheOptions

The cache options for the client.

guildCacheOptions GuildCacheOptions

The cache options for the guild.

Returns:
Type
Boolean

toJSON(format) → {Object}

Description:
  • Returns the JSON representation of this structure.

Source:
Parameters:
Name Type Description
format Number

The format to return the data in.

Returns:
Type
Object

toString()

Source: