!hug command is not working

Asked Sep 24, 2020·3 replies·Last activity 5 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.

I tried adding a hug command using
!addcom !hug $(user) hugs $(touser) $(eval let responses = [with all their heart!, showing their appreciation!, but, I am only joking :P, but, is rejected :(, with all the love in the world!, ]; responses[ Math.floor(Math.random() * responses.length) ]; )

but the result is is excluding the EVAL and just uses everything after $(touser) as text.

3 replies

Hey @Topaz Hamster!

Your command should be working, anyway, I improved it slightly, so if you want to use this code instead:

!addcom !hug $(eval r=[` with all their heart!`, `, showing their appreciation!`, `, but I am only joking :stuck_out_tongue:`, `, but is rejected :frowning:`, ` with all the love in the world!`]; `$(user) hugs $(touser)${r[Math.floor(Math.random()*r.length)]}`;)

Is there a way to make it always hug whoever is streaming? Not another user

Instead of $(touser) put in $(channel)