Command to return [wins] from different platforms

Hey community!

I’m trying to create a command that returns the overall number of wins in Fortnite.
Is it possible to evaluate (to sum) the wins from different platforms?
For example:

!commands add !wins -cd=5 -ul=everyone $(urlfetch + $(urlfetch

But problem is that inserted url returns text and number of wins… Any ideas how to write the proper command?
I could use $(eval x+x) but the problem is the same :sweat_smile:
Thank you for your help!


!addcom -cd=5 !wins $(eval try{`$(urlfetch$(urlfetch`.match(/Wins: [0-9]+/g).map(a=>parseInt(a.split(` `)[1])).reduce((a,b)=>a+b);}catch(e){`Could not calculate the total wins!`;})

In the above command setup, you will see this string:


Edit these URL calls to make the API requests that you need. You can add more $(urlfetch) variables to this string if necessary.

You’re a pure god! :sweat_smile:
You just wrote ‘Kills:’ instead of ‘Wins:’ … anyway thank you for your help! Here is a full code if anyone has this problem as well:

!addcom -cd=5 !wins NAME’s wins: $(eval try{$(urlfetch$(urlfetch [0-9]+/g).map(a=>parseInt(a.split()[1])).reduce((a,b)=>a+b);}catch(e){Could not calculate the total wins!;})

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.