Wins counter with number of kills

Asked Dec 5, 2023·5 replies·Last activity 2 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

Hi, I'm using this API currently: (link expired)

And when someone uses the command "!wins" to see the number of wins, it returns something like [channel] has 5 wins (5K, 10K, 20K, 2K 8K). With K being the number of kills.
I need to replace the letter K to something else, but I can't figure it out.
Can someone give me a hand with this?

Thanks a lot!

5 replies

This is the !wins command, in case someone can find the way to do what I want:

$(eval a=$(urlfetch https://twitch.center/customapi/quote/list?token=xxxxxxxx&no_id=1);a.match(/K/g)!=null?b=a.match(/K/g).length:b=0;a=a.slice(0,a.length-1);b>0?c=(+a.split(|).join(, )+):c=`;$(channel) lleva +b+ wins `+c)

Hey @Giddy Dodo!

Given you didn't specify which character you'd like to replace K with, you'll have to do it yourself: K is in every commands in that post (4 commands), my recommendation is to copy/paste the commands in a basic text editor, such as Notepad (avoid text processors like Microsoft Word), then search K with Ctrl + F and replace every instance of K that isn't part of a word (token, kill) with your desired character.

Hey Emily, thank for the reply.
I tried that, but I don't know what am I doing wrong cause as soon as I replace any of the K on the command, it only works in the answer that the command returns when using !addwin but in the return line when asking for total wins it keeps saying the number of kills followed by a K.
I don't get it.

if u just want it changed for this output, u can replace the part where it says...

js
`$(channel) lleva `+b+`wins`+c)

with...

js
`$(channel) lleva ${b} wins ${c.split(`K`).join(`<NEW CHARACTER HERE>`)}`)

and then put in whatever u want for <NEW CHARACTER HERE>

Stellar Raccoon said:
${b} wins ${c.split(K).join(<NEW CHARACTER HERE>)})`

YES!! Thank you tiwosslave!! That did the trick!!!!

Thanks thanks thanks

Didn't find your answer? The community is on Discord.

Ask on Discord