schafezp / karmabot

A telegram bot designed for group chats to allow users to upvote and downvote content similar to reddit.
https://schafezp.github.io/karmabot/
MIT License
6 stars 1 forks source link

Have /userinfo show the rank of a user relative to others #4

Open schafezp opened 6 years ago

schafezp commented 6 years ago

Is your feature request related to a problem? Please describe. The /userinfo command should encapsulate all the information about a particular user that someone would want to know. Currently /userinfo does not show what rank out of the chatroom an individual is. It would be useful to provide this information through /userinfo

Describe the solution you'd like /showkarma username:karma user1:10 user2:9 user3:5 /userinfo user2 user2: ranked 2/3 second place information about karma stats

Describe alternatives you've considered Additionally users ranked 1,2 or 3 should get 🥇, 🥈,🥉 metals as defined in unicode 9.0. Perhaps users at the bottom rank should have some kind of emoticon, but I don't want to disparage users (especially for new users to a group who haven't built up karma)

Additional context How can this be implemented in a SQL query? perhaps on the server side we can just iterate over the /showkarma results. Alternatively see if its possible to have SQL return the index in an ordered list.