Hi guys, I'm using a points system for my twitch channel and I wanted to create a command that can show viewers who have the most points. So I created a command called !toppoints and it's working fine. However, I really really don't like how I coded it and I would like to know how I can improve the code so I can specify a number to the command. Ex: !toppoints 5 (Will display the 5 viewers who have the most points)
Goals:
- Cleanup the code
- Add a number parameter so the code can be more flexible
Thanks for any of your help!
Code