fetchMessageReactions


General

fetchMessageReactions fetches all the reactions in a message.


Usage

Client:fetchMessageReactions(<string> channelId, <string> messageId, <string> reaction, (number) limit, (array) options)
Returns: <array> data

Data array contains Reaction objects inside.
If there are no reactions in the message, this will return an empty table.

Options is an array, it may contain:
(string) before - Users with lower ID than....
(string) after - Users with higher ID than...


Limitations

See discordMessage PATCH.


Example

local message = Client:getMessage("493672466544197633", "569464667869544448")

for reactionId, reaction in pairs(message.reactions) do
    for _, user in pairs(Client:fetchMessageReactions("493672466544197633", "569464667869544448", reactionId)) do
        print(user.username)
    end
end

 

Back to top