Closed coryshaw1 closed 8 years ago
Ah, I honestly didn't test out the getScore function to see what it did. That does give the total number of updubs and downdubs, but returning this._.room.play.dubs
will also give the userids of the votes casted. This allows for you to see who has voted what.
Every user has a dub
property which can be 'updub'
, 'downdub'
or undefined
. You can do bot.getUsers().filter(function(usr) {return usr.dub === 'updub';})
and get their IDs as well as everything else about the users.
I know this isn't documented too well. I haven't quite got the hang of writing useful docs yet.
Ah didn't notice that property on the user object. getDubs definitely isn't needed. Closing now.
Hey, thanks for taking the time to submit a PR.
Though, I'm a bit puzzled. What use case does this cover that existing functions don't? getScore and getUsers cover everything I can think of as far as dubs.