lexitorius
DIAdiscord.js - Imagine an app
•Created by lexitorius on 2/23/2024 in #djs-questions
Reading reaction info
I am attempting to take an array of reactions on a given message and identify the individual users that have posted each reaction. I have run into an issue where I can only reliably console.log the bot's user ID, and the list does not contain the rest of the user IDs unless the command is run immediately following a reaction state change (someone adds one). The other issue I'm running into is that I can console.log the information, but I can't seem to access it programmatically.
This line of code is turning the reaction.users circular collection into something I can read in the console.
Before that line is stringifying the array, this block is trying to read each element of the reactions.users array and console log it:
This is not working. The console log is returning a list of userIDs in the stringified log, but returning
Id:
for the block that is trying to get the user IDs. I am not sure what to do or try next, as I've already dug through youtube, guides, and chatGPT17 replies
DIAdiscord.js - Imagine an app
•Created by lexitorius on 2/23/2024 in #djs-questions
Issue reading list of users who have reacted to a message
Afternoon,
I'm creating a voting system in one of my servers that has users choose one of eight options. I am currently attempting to get the bot to reliably read the list of users that have reacted to each reaction, while also ignoring its own reactions.
Related code
The line in particular is the third from bottom, which is supposed to take all reactions that are greater than 1 (in order to ignore the bot's) and list the users associated with them. When I do let it include itself, it lists the bot's user ID correctly, but it otherwise returns this:
I have tried looking up reaction guides on youtube, documentation, and bickering with chatGPT, to no avail. I have all intents enabled so it's not an intent issue
3 replies