Eval variable through invalid token error

Asked Jan 28, 2024·3 replies·Last activity 2 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.

Hi im trying to set up a slap command with random responses but keep getting invalid token messages. This is what i have typed but it doesnt work. Any advice please?
!addcom !slap $(user) just slapped $(touser) with $(eval const responses = [‘a flaming hot cannon ball’, ‘the captains hat’, ‘a piece of gold treasure’, ‘a bottle of rum’, ‘a flintlock pistol’, ‘a masterball’, ‘a wild oddish’, ‘a five guys burger’, ‘an empty dominos pizza box’, ‘puntlands peg leg’, ‘a broken compass’, ‘a footlong sausage’]; responses[Math.floor(Math.random() * responses.length)];) 🏴‍☠️👋

3 replies

Please ignore the wink.. its ; and ) put together

Ive tried to remove a response in order to get it under 400 characters but still throws up a invalid token error saying Invalid or unexpected token [<context>:1:20]