Reaction - truemedian/Discordia GitHub Wiki

Inherits Container

Represents an emoji that has been used to react to a Discord text message. Both standard and custom emojis can be used.

Methods

getUsers
getUsersBefore
getUsersAfter
delete

Properties

emojiId
emojiName
emojiHash
emojiURL
me
count
message

Inherited from Container
client
parent

Methods

:getUsers( [ limit ] )

Returns a newly constructed cache of all users that have used this reaction in its parent message. The cache is not automatically updated via gateway events, but the internally referenced user objects may be updated. You must call this method again to guarantee that the objects are update to date.

Name Type Optional
limit number x

Returns: SecondaryCache

:getUsersBefore( id, [ limit ] )

Returns a newly constructed cache of all users that have used this reaction before the specified id in its parent message. The cache is not automatically updated via gateway events, but the internally referenced user objects may be updated. You must call this method again to guarantee that the objects are update to date.

Name Type Optional
id User ID Resolvable
limit number x

Returns: SecondaryCache

:getUsersAfter( id, [ limit ] )

Returns a newly constructed cache of all users that have used this reaction after the specified id in its parent message. The cache is not automatically updated via gateway events, but the internally referenced user objects may be updated. You must call this method again to guarantee that the objects are update to date.

Name Type Optional
id User ID Resolvable
limit number x

Returns: SecondaryCache

:delete( [ id ] )

Equivalent to Reaction.message:removeReaction(Reaction)

Name Type Optional
id User ID Resolvable x

Returns: boolean

Properties

.emojiId

The ID of the emoji used in this reaction if it is a custom emoji.

Type: string|nil

.emojiName

The name of the emoji used in this reaction if it is a custom emoji. Otherwise, this will be the raw string for a standard emoji.

Type: string

.emojiHash

discord hash for the emoji, or Unicode string if it is not custom.

Type: The

.emojiURL

string The URL that can be used to view a full version of the emoji used in this reaction if it is a custom emoji.

Type: string|nil

.me

Whether the current user has used this reaction.

Type: boolean

.count

The total number of users that have used this reaction.

Type: number

.message

The message on which this reaction exists.

Type: Message

Inherited from Container

.client

A shortcut to the client object to which this container is visible.

Type: Client

.parent

The parent object of to which this container is a child. For example, the parent of a role is the guild in which the role exists.

Type: Container|Client

⚠️ **GitHub.com Fallback** ⚠️