This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Creates a new command to display a players rapid elo | |
# usage: !elo username (!elo hikaru) | |
# response: hikaru current rating is 2594 and highest rating is 2829 | |
!addcom !elo | |
$(eval | |
const api = $(urlfetch json https://api.chess.com/pub/player/$(query)/stats); | |
"$(query) current rating is "+ api[`chess_rapid`][`last`][`rating`] + | |
" and highest rating is " + api[`chess_rapid`][`best`][`rating`] | |
) |