How to make FMK twitch command ?

Hey guys I found some code that will return three random users and was wondering if someone could explain how I need to go about editing it to make a ( f word), marry, kill return. Example !fmk, Soundwave (f word) user, marry user, and killed user. Any help would be appreciated, much thanks!

$(eval r=`$(urlfetch json http://tmi.twitch.tv/group/user/$(channel)/chatters)`;try{c=JSON.parse(r).chatters;a=c.vips.concat(c.moderators,c.staff,c.admins,c.global_mods,c.viewers).filter(n=>![`$(user)`,`Nightbot`,`UnwantedUser3`].some(o=>n.toLowerCase()==o.toLowerCase()));t=[];if(a.length<3) throw `not enough chatters in chat`;for(i=0;i<3;i++){t.push(a.splice(Math.floor(Math.random()*a.length),1))}`$(user), A - ${t[0]}, B - ${t[1]}, C - ${t[2]}`}catch(e){`Error: ${e}`.slice(0,400)})

It’s easy to edit just replace the letters A,B,C with the words you want.
I edited it for you :wink:

!addcom !fmk $(eval r=$(urlfetch json http://tmi.twitch.tv/group/user/$(channel)/chatters);try{c=JSON.parse(r).chatters;a=c.vips.concat(c.moderators,c.staff,c.admins,c.global_mods,c.viewers).filter(n=>![Nightbot,UnwantedUser3].some(o=>n.toLowerCase()==o.toLowerCase()));t=;if(a.length<3) throw not enough chatters in chat;for(i=0;i<3;i++){t.push(a.splice(Math.floor(Math.random()*a.length),1))}$(user), Fuck ${t[0]}, Marry ${t[1]}, Kill ${t[2]}}catch(e){Error: ${e}.slice(0,400)})

2 Likes

Hey @Soundwave!

Please use the search bar before opening a new topic:


Anyway, @Zoroarid solution is correct.

1 Like

ok, thank you for your help!

Thank you for the help and the explanation !

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