Nighbot Commands too short

Is there any way to add more characters to the nightbot commands? Or have the ability to upload a document that nightbot can read? A friend of mine uses chatbot and it will read a random line from notepad document with this command line.

$dummy $readrandline(C:\Users\Person\Documents\8Ball.txt)

They use it for 8ball and fridge commands so they can have as many responses as they want.
I tried to set up a 8ball but I was very limited on the responses as I ran out of characters.

Hiya, Nightbot can’t read local files, but can for example read pastebin file. Using $(urlfetch) and $(eval). You can search this forum for examples, here’s a random one of the many results: Trying to pull random line from pastebin command. Help please? - #2 by Emily

1 Like

Ok. I set up a pastebin and tried to make the command work and after a bunch of trial and error ended at

$(eval const responses = “$(urlfetch json https ://pastebin. com/raw/uRQ8Diwm )”.split(“,”); a[Math.floor(Math.random() * (a.length)]; ) <inserted space at end so it didn’t create emoji

I added a space after the https and . com but my command is all one string with no spaces in reality.

but I can’t get it to work…I know nothing about coding so any help would be appreciated. I want to move a few other commands over to pastebin so I can have more responses.

I tried the code that was in the attached topic and it didn’t work either. It just replies Nightbot Unexpected identifier!

This should work:

$(eval const a="$(urlfetch json )".split(","); a[Math.floor(Math.random() * a.length)];)

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