-
Notifications
You must be signed in to change notification settings - Fork 144
Reaction
extends Container
Represents an emoji that has been used to react to a Discord text message. Both standard and custom emojis can be used.
Instances of this class should not be constructed by users.
Properties Inherited From Container
Name | Type | Description |
---|---|---|
client | Client | A shortcut to the client object to which this container is visible. |
parent | Container/Client | 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. |
Name | Type | Description |
---|---|---|
count | number | The total number of users that have used this reaction. |
emojiHash | string | The discord hash for the emoji used in this reaction. This will be the raw string for a standard emoji. |
emojiId | string/nil | The ID of the emoji used in this reaction if it is a custom emoji. |
emojiName | string | The name of the emoji used in this reaction. This will be the raw string for a standard emoji. |
emojiURL | string/nil | 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. |
me | boolean | Whether the current user has used this reaction. |
message | Message | The message on which this reaction exists. |
Methods Inherited From Container
Defines the behavior of the ==
operator. Allows containers to be directly compared according to their type and __hash
return values.
Returns: boolean
Defines the behavior of the tostring
function. All containers follow the format ClassName: hash
.
Returns: string
Returns Reaction.emojiId or Reaction.emojiName
Returns: string
Parameter | Type | Optional |
---|---|---|
id | User-ID-Resolvable | ✔ |
Equivalent to Reaction.message:removeReaction(Reaction)
This method always makes an HTTP request.
Returns: boolean
Parameter | Type | Optional |
---|---|---|
limit | number | ✔ |
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.
This method always makes an HTTP request.
Returns: SecondaryCache
Parameter | Type | Optional |
---|---|---|
id | User-ID-Resolvable | |
limit | number | ✔ |
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.
This method always makes an HTTP request.
Returns: SecondaryCache
Parameter | Type | Optional |
---|---|---|
id | User-ID-Resolvable | |
limit | number | ✔ |
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.
This method always makes an HTTP request.
Returns: SecondaryCache