I am trying to make a random joke generater

I tried and it says there is an unexpected token

The command is set like this
!commands add !joke $(eval const jokes =[‘What do you call a karate pig? A pork chop.’, ‘Why did the golfer bring two pairs of pants? In case he has a hole in one.’, ‘What did the policeman say to his belly button? You are under a vest.’, ‘How many babies does it take to paint a fence? Depends on how hard you throw them!’, ‘What is brown and sticky? A stick.’, ‘No’, ‘Your Life’, ‘Why’]; jokes[Math.floor(Math.random() * jokes.length)]:wink:

Hey @bossaxeking!

I’m not sure where the issue is, but I quickly updated the code a tiny bit, and tested it, it works just fine.

!addcom !joke $(eval j=[`What do you call a karate pig? A pork chop.`,`Why did the golfer bring two pairs of pants? In case he has a hole in one.`,`What did the policeman say to his belly button? You are under a vest.`,`How many babies does it take to paint a fence? Depends on how hard you throw them!`,`What is brown and sticky? A stick.`,`No`,`Your Life`,`Why`];j[Math.floor(Math.random()*j.length)];)
1 Like

Thank you so much my community absoloutly loves it

1 Like

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