Random fact command not working?

Asked Apr 19, 2025·1 reply·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.

hi, im having an issue with nightbot trying to do the random fact command. its my first time doing this command so im not entirely sure what is wrong, however i keep getting an error code or some form of error when trying to see if the code works. can someone please help me? ive seen all the codes and have been using all the same ones but theres just an issue with mine it seems. the error code would be "Unexpected identifier 'Tigers' [<context>:1:9495]"

image_2025-04-19_030536043.png

1 reply

You're need to use the raw version of the Pastebin link:

$(eval a=$(urlfetch json https://pastebin.com/raw/i60arHh7); a[Math.floor(Math.random()*a.length)])