Random pun generator

Asked Sep 16, 2020·5 replies·Last activity 5 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.

Hey I wanted to create a command that would display a random pun in chat when activated. I have been using $(eval a=$(urlfetch json https://pastebin.com/raw/AGBHxx7h).split(,);a[Math.floor(Math.random()*(a.length-1))])
This keeps giving me " Remote Server Returned Code 403" whenever this is used in my chat. I am not sure what to do to make it work

5 replies

Hey @Tufted Llama!

Paste the URL in a incognito tab and you'll figure it out! :)
The paste is private, it needs to be unlisted instead.

I had no idea that making it private would make the command not work. That worked perfectly. Thank you so much for looking at that

Do you know if there is any way to make some of the options in the paste bin more rare than others? I was wanting a few of them to have have like 1/10 the chance of showing up compared to the rest.

I think you figured it out? By looking at your paste now: some responses are here 10 times, and some are just here one time, which achieves the wanted result.

Yeah. I realized that it was a lot easier than I thought it would be.

Didn't find your answer? The community is on Discord.

Ask on Discord