Skip to content

Instantly share code, notes, and snippets.

@WouterSchols
WouterSchols / Nightbot chess commands
Last active February 29, 2024 21:17
A collection of nightbot commands for the twitch chess community
# 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`]
)