Trying to run a multi response lurk command

Asked Jan 30, 2025·2 replies·Last activity 1 year 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.

im using

!addcom !example $(eval responses = $(https://pastebin.com/raw/eFScvDre).split(;); + responses[Math.ceil(Math.random() * responses.length)])

and i keep getting the response of

!addcom !example NaN

what did i do wrong?

2 replies

Hiya, there's a few things wrong, try this:

!addcom !example $(eval arr='$(urlfetch json https://pastebin.com/raw/eFScvDre)'.split(';'); arr[Math.floor(Math.random()*arr.length)])