Tag multiple random people in chat

Using Nightbot and just wondering if there is a command similar to !commands add !slap $(user) has slapped $(urlfetch http://2g.be/twitch/randomviewer.php?channel=$(channel)). BUT will let me tag multiple random viewers in the channel instead of just one random viewer.

@Jondiaz021 You can copy and paste the $(urlfetch) variable as many times as you need in your command response (or until you hit the 500 character response limit). But I guess you don’t want Nightbot to repeat names, so copy and paste this into chat:

!addcom -cd=5 !slap $(user) has slapped $(eval a=JSON.parse(`$(urlfetch json http://tmi.twitch.tv/group/user/$(channel)/chatters)`).chatters;b=a.moderators.concat(a.staff,a.admins,a.global_mods,a.viewers);c=decodeURIComponent(`$(querystring)`);if(c==``){d=1;}else{e=parseInt(c);if(e!=NaN&&e>0&&e<=b.length){d=e;}else{d=1;}}f="";for(i=0;i<d;i++){g=Math.floor(Math.random()*b.length);f+=b[g];b.splice(g,1);}f).

How to use this command:

!slap [number of users you want to tag]

If you don’t specify a number OR if the number is larger than your channel’s viewer list, the number of users defaults to 1.

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