Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140788

discord.js getting each list for users for reactions

$
0
0

ok so I have been wroking on this for a while not I am making a vote bot and have gotten stuck on this part of the code I am its meant to show a list of each user that has clicked on a reaction in discord but is not coming out right it seems to display the user after getting both choice printed in console log

choices = {
        "👍": "yes",
        "👎": "No"
    }


    message.channel.fetchMessage(messageid ).then(r => {
        r.reactions.forEach(async (H) => {
            console.log(choices[H.emoji.name]);
            users = await H.fetchUsers();
            await  users.forEach(g => {
                    console.log(g.username);
                });

        });
       ```
but I am getting 
yes 
no 
bob 
Sarah
luke 
john  
when I am trying to get 
yes 
bob 
Sarah
luke 
No
john  





Viewing all articles
Browse latest Browse all 140788

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>