!8ball Pirate Joke Generator

Gave up trying to pull random pirate jokes similar to how icanhazdadjoke works so i decided to just make a command similar to 8ball, but cant figure out why its returning all the text when i activate the command. Any help would be great.

$(eval const responses = [‘What is a pirate/s least favorite vegetable? Leeks!’, ‘What are the 10 letters for the pirate alphabet? I I R and the 7 Cs’, ‘What do pirates use telephones for? Booty Calls’, ‘How does a pirate feel about his spouse? Ye ho ho’, ‘In Battleship why do pirates always lose? Their ships are always on the C/s’, ‘What is a pirate without a ship? A creative homeless guy’, ‘How do pirates pay for a round o/rum down at the pub? With Bar-Nickles!’, ‘What is a pirate/s favorite element? Ye might say Arrrrrrgon…. but it/s the element of surprise!’, ‘Why do seagulls fly over the sea? Because if they flew over the bay they/d be bagels!’, ‘Why don/t pirates go to college? Because they are C students’, ‘They say that pirates are so tough that they don/t cry but they do cry. They are just private tears.’, ‘What is a Sea of Thieves streamer scared of getting? Carrrrrrrrrrrrpal Tunnel’, ‘What do pirates do in the evenings? Your Mothaaahhhhrrrr’]; responses[Math.floor(Math.random() * responses.length)]:wink:

@ossicle

This command response is well beyond the 500 character limit, which is why the command is not evaluating properly.


Look at this pastebin file I use for a trivia command. Note the following aspects of the file:

  • The file starts and ends with square brackets []
  • Each trivia fact is bounded by backticks ``
  • The facts are separated by commas.

Go to https://pastebin.com and create a file for your pirate joke command that follows the same aspects as detailed above. Once you create it, copy and paste the following command setup into your Nightbot dashboard to create the command. Replace RAW_PASTE_LINK with the raw paste link to your pastebin file (the link looks like https://pastebin.com/raw/blahblah):

$(eval a=$(urlfetch json RAW_PASTE_LINK);a[Math.floor(Math.random()*a.length)])

here is my raw paste bin https://pastebin.com/raw/mbE7UhBk
here is the Raw_Paste_Link/command- $(eval a=$(urlfetch json https://pastebin.com/raw/mbE7UhBk);a[Math.floor(Math.random()*a.length)])

It is only coming back with Right-hand side of ‘instanceof’ is not an object

The second joke doesn’t have a backtick at the end.

omfg. been pulling my hair out. it works. thanks.

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