Memes or Jokes Command

Hi I hope someone can help me

So what im thinking of is a command that when I type !meme or !joke , nightbot will send out a random joke from a list that I will be making. Also how can I put the jokes on a list that nightbot will choose.

This command would be good for those viewers that is on queue to join my games.

Hey @CLN!

What you’ll need to do is to create a Pastebin account (that way you can go back in later to edit the command), then create a unlisted paste with no expiration date, similar to this one.

Notice how it’s structured:

Meme or joke #1;
Meme or joke #2;
Meme or joke #3;
...
Meme or joke #n

All your jokes must end by a separator, in the example it’s a ; (semi-colon), but it could be anything else, like a } (closing bracket) for example, that said I don’t recommend using either of these: ,.:`'", or any character you’d use in a regular sentence.
Also, the last joke doesn’t need to be ended with the separator.

Now here’s the command:

!addcom !joke $(eval j=`$(urlfetch json https://pastebin.com/raw/XXXXXXXX)`.split(`SEPARATOR`); j[Math.floor(Math.random()*j.length)];)

Replace XXXXXXXX with your paste ID, and SEPARATOR with the separator you chose to use.

Wow so detailed and precise, thank you so much! I would shake your hands if I can
Thank you so much have a good one!

1 Like

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