Need help with eval

i tried this and it won’t work
!commands edit !whack $(user) has whacked $(touser) with $(eval const r = [‘A Lightsaber., ‘a metal pole!’, ‘a stick.’, ‘a hamster.’, ‘a hamster powering a brain.’, ‘a blaster pistol.’, ‘a gun.’, ‘a Lucario.’, ‘a box.’, ‘a cat.’, ‘a dog.’, ‘a wolf.’, ‘empty glass bottle.’, ‘a basket.’, ‘a controller.’, ‘a whip.’]; responses[Math.floor(Math.random() * responses.length)];) and i’m getting a “Right-hand side of ‘instanceof’ is not an object” error


!commands edit !whack $(user) has whacked $(touser) with $(eval a=[`a Lightsaber.`,`a metal pole!`,`a stick.`,`a hamster.`,`a hamster powering a brain.`,`a blaster pistol.`,`a gun.`,`a Lucario.`,`a box.`,`a cat.`,`a dog.`,`a wolf.`,`an empty glass bottle.`,`a basket.`,`a controller.`,`a whip.`];a[Math.floor(Math.random()*a.length)])
1 Like

Thanks it worked thank you

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