How to make FMK twitch command ?

Asked Aug 11, 2022·4 replies·Last activity 4 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.

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)})

4 replies

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

!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)})

Thank you for the help and the explanation !