Link to PR here
New Features
- Added support for typescript and es6 syntax
- Added a bunch of new config files
- tsconfig
- preprocessor
- tslint
- Added a leaderboard module
Implementation
The typescript refactor was a major code overhaul, which not only reworked everything into typescript but also began to organize the code with separations of concerns in mind. The data file holds all information regarding the steem blockchain and the nowplaying database. The main file is only used for configurations and running functions from other modules.
The leaderboard was created by sorting all contestants first by posts, then by number of cumulative votes, then by alphabetical order. See the getRankings function on line 14
- Big refactor into typescript
- Separated files by function
- Added a bunch of new config files
- Added the leaderboard function which supplies an output like:
## Leaderboards
Rank | User | Weeks | Votes
-|-|-|-
1 | @indy8phish | 4 | 117
2 | @nowplaying-music | 4 | 1330
3 | @anatolianwishdom | 4 | 39
4 | @bennettitalia | 4 | 768
5 | @majes.tytyty | 4 | 624
6 | @hanlovello | 4 | 234
...
That output looks like:
Now Playing
Check out the @nowplaying-music bot and contest in action and enter week 5
Posted on Utopian.io - Rewarding Open Source Contributors