Nighbot Commands too short

Asked Jan 19, 2023·3 replies·Last activity 3 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.

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.

3 replies

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:

js
$(eval const a="$(urlfetch json https://pastebin.com/raw/uRQ8Diwm )".split(","); a[Math.floor(Math.random() * a.length)];)