How to create Nightbot command to !slap streamer ONLY?

I just found out about the !slap command and want to modify it to slap the streamer ONLY when someone types !slap. Right now if it’s anything other than “tosuer” it doesn’t work, but touser is pointless… it will say “WayneTables slapped Waynetables with a cactus”…

Is there a way to point the command to the streamer, Dwight_LOL ?

!addcom !slap $(user) slapped $(touser) with a $(eval a=[stinky fish,television set,cactus];a[Math.floor(Math.random()*a.length)])!

You should just be able to replace $(touser) with $(channel) though you could also just write the streamers name in the command.

Hey @Waynetables!

This should do the job:

!addcom !slap $(eval t=`$(query)`?`$(query)`:`Dwight_LOL`;o=[`stinky fish`,`television set`,`cactus`];`$(user) slapped ${t} with a ${o[Math.floor(Math.random()*o.length)]}!`)
1 Like

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