@$(user), $(eval m=‘$(urlfetch json https://valomind.com/api/mmr-history/AP/Huunter101/BTHL)’;r=JSON.parse(m);t=0;h=new Date().getHours();p=new Date().getDate();a=0;b=0;for(i=0;i<r.data.length;i++){d=r.data[i].date;s=d.indexOf(“,”,d.indexOf(“,”)+1);d=d.substring(s-2,s);n=r.data[i].mmr_change_to_last_game;if(h>16&&d>p){d=p;}if(p==d&&n>0){t+=n;a++;}else if(p==d){t+=n;b++;}}g="Huunter101 is ";if(t>0){g+="UP ";}else{g+=“DOWN “;}g+=t+“RR. He is “+a+”-”+b+” in the past 24hrs.”;g;) this comes up with a problem saying Unexpected token ‘R’, “Remote Ser”… is not valid JSON
https://valomind.com/api/mmr-history/AP/Huunter101/BTHL
seems to be outputting an error message, so you’ll likely need to reach out to whoever runs that service to report the issue.
i have a new code which outputs what im looking for, but i cant customize it can you guys help me customize it a bit more to something like this,
@user, Huunter101 is currently 1W-2L. He is DOWN -7 RR this stream! (If the record seems off, he’s probably on an alt or stream restarted)
at the moment it outputs this - [Refresh Daily] Total of 3W-0L in ranked matches within the past 24 hours! UP: Gained +55RR within the past 24 hours! Win Percentage: 100.00% | Win-Loss Ratio: 3
`
$(urlfetch json https: //api. kyroskoh.xyz/valorant/v1/winlose/ap/Huunter101/BTHL). i had forgot to add the code
`
and i added a space to the xyz part because its a link
Try:
$(eval const data = "$(urlfetch json https://api.kyroskoh.xyz/valorant/v1/winlose/ap/Huunter101/BTHL)"; const matches = data.match(/(\d+)W-(\d+)L/); const rr = data.match(/(?:DOWN: Lost|Gained) ([+-]?\d+)RR/); matches && rr ? "$(touser), Huunter101 is currently " + matches[1] + "W-" + matches[2] + "L. He is " + (rr[1].startsWith("-") ? "DOWN " : "UP ") + rr[1] + "RR this stream! (If the record seems off, he’s probably on an alt or stream restarted)" : "Data not available or format has changed.")
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.