Hi everyone,
I use a !wr command that works great and pulls data from an api but it requires an input such as !wr Any% for it to work.
What I was wondering is if there is any way to make the ($query) default to say Any% if no extra data is given?
The full command looks like this:
$(eval json=$(urlfetch json https://www.speedrun.com/api_records.php?game=mm); title = Object.keys(json)[0]; record=json[title]["$(query)"]; hours = Math.floor(record.time / 3600); minutes = Math.floor(record.time % 3600 / 60); seconds = Math.floor(record.time % 3600 % 60); title + "'s $(query) record is " + hours + "h " + minutes + "m " + seconds + "s RTA by " + record.player + “!”)
Thanks