NightDev Community Forums

Want night bot to post random jokes every 15mins

#1

want night bot to post random jokes every 15mins from a joke file how can we do this please take in mine i am useless many thanks in advance

#2

Hey @smartymarty001!

  1. Go to Pastebin and fill a paste with your jokes, it’s not an issue if the jokes are all one after the other, but you can also enter a joke per line, what matters is that between each joke you add an hashtag (#) and that you don’t use an hashtag anywhere in your jokes. Make sure each joke doesn’t go above 400 characters.
    The paste should look like this: Joke_1 # Joke_2 # Joke_3 # ... # Joke_x

  2. Save the paste and make sure the expiration date is set to “never”. I recommend you to create a free account so you can come back to edit the paste later if you want to add or remove jokes.

  3. Copy the URL of the paste, it should look like this https://pastebin.com/xxxxxxxx and add raw/ before the letters identifying your paste, like this https://pastebin.com/raw/xxxxxxxx

  4. Replace PASTE_URL with the paste URL in the following code:
    $(eval a=`$(urlfetch json PASTE_URL)`.split(`#`);a[Math.floor(Math.random()*a.length)])

  5. Go on your Nightbot Dashboard timers page, add a timer, and paste the code in the message field, set the interval to 15min, give it a name, click submit and there you go!

Hope this is clear enough.