Variables in urlfetch

Alright, i looked through the forums and still couldnt hack it so…

i have this
$(urlfetch https://splendid-groovy-feverfew.glitch.me/valorant/($1)/($2)/($3)?onlyRank=true&mmrChange=true)

and don’t know how to make it put my variables in.

I tried doing this
$(eval var json = $(urlfetch https://splendid-groovy-feverfew.glitch.me/valorant/($1)/($2)/($3)?onlyRank=true&mmrChange=true)

with no luck. Any help appreciated, thanks!

I guess you want to create a command like “!valorant variable1 variable2 variable3” and have those variables passed to the URL. If that’s the case, try this:

$(eval a=decodeURIComponent("$(querystring)").split(" "); a.length == 3 ? "$(urlfetch https://splendid-groovy-feverfew.glitch.me/valorant/" + a[0] + "/" + a[1] + "/" + a[2] + "?onlyRank=true&mmrChange=true)" : 'Enter 3 parameters')

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