Long command or remote command?

Asked Aug 23, 2020·30 replies·Last activity 6 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.

how can I add a command over 200 characters or pick from a remote list? not enough room on the site and not enough room to add command from chat.

30 replies

If your adding the command via nightbot.tv you should be able to make the command up to 500 characters long but, I assuming your using the youtube platform it can only output responses up to 200 characters long. As for picking from a remote list there are a few different ways I’d recommend urlfetching a pastebin link.

well over 500 characters unfortunately. havent been able to find anything to set it up via pastebin or others. and can I stack my list to make editing easier. ex:

original:
$(user) $(eval a=[“Gator Rush Introduction”, “Gold Rush”, “Lake Michigan“, “Glacier Park SquadX Event”, “Glacier Park Tiger Tonic Event”, “Lake Michigan by Night”, “Gator Rush Main Event”, “Glacier Park”, “Bayou”, “Lake Michigan Endurfix Event”];a[Math.floor(Math.random() * a.length)])

pastebin:
$(user) $(eval a=[
“Gator Rush Introduction”,
“Gold Rush”,
“Lake Michigan“,
“Glacier Park SquadX Event”,
“Glacier Park Tiger Tonic Event”,
“Lake Michigan by Night”,
“Gator Rush Main Event”,
“Glacier Park”, “Bayou”,
“Lake Michigan Endurfix Event”

];a[Math.floor(Math.random() * a.length)])

Would this function broken up like this?

Rapid Dolphin said:
a=[
“Gator Rush Introduction”,
“Gold Rush”,
“Lake Michigan“,
“Glacier Park SquadX Event”,
“Glacier Park Tiger Tonic Event”,
“Lake Michigan by Night”,
“Gator Rush Main Event”,
“Glacier Park”, “Bayou”,
“Lake Michigan Endurfix Event”

];a[Math.floor(Math.random() * a.length)]

Just take this part and put it into a pastebin then do this:

$(user) $(eval $(urlfetch json https://pastebin.com/raw/xxxxxx))

Make sure to include the raw pastebin link otherwise it won’t read properly.
And the json in the urlfetch is necessary. Hope this helped 🙂 and you can format the pastebin with as many new lines as you need and they just get passed over in the eval

Ex. Hi there

Reads the same as

Hi
there

Hmmm...

url is a URL that returns a body in plain text with less than 400 characters in its response

Raw link seems to be the same as well

The urlfetch can return more than 400 characters in a response if you use “json” in it so it knows it’s part of an eval. Just makes making long eval commands possible.

says the response needs to be JSON type. I dont see a setting for that

Don’t include the “$(user) $(eval” at the beginning and get rid of the last “)”
Nightbot can’t tell variables that are fetched through a urlfetch.

Yes, the command will look like this on the nightbot page:

$(user) $(eval $(urlfetch json https://pastebin.com/raw/KV7yXtBG))

This should work the way you intend it to.

thank you, makes sense... but no luck yet:

$(user) $(eval $(urlfetch json https://pastebin.com/raw/KV7yXtBG))

Ok in your pastebin I just noticed it seems you have used “ instead of " very simple mistake but it causes it to not read properly I suggest replacing the “ with ` .
Like this

`Message`, `Message2`, `Message3`

Not just single quotes but specifically “ `

Tilde is “~” but, yes I believe the keyboard shortcut is next to the 1

gotta be a simple mistake somewhere I'm missing

From my testing of the command it’s working fine are you still experiencing issues?

I'm getting no response in yt chat on PS4. others commands work fine btw. including another urlfetch command

Make sure the link is correct and there is nothing after it.
Though it should be working I tested it out on my nightbot on twitch and it works fine. What do you mean when you say it returns no response like nightbot literally returns nothing? If so make sure the command name is spelled properly and your calling it correctly.

yes it returns nothing and nothing in the logs. its spelled correctly. I'll check for trailing spaces. thats all I can think of.

Everything looks good :shrugs:

Can you link me to your command page the link you get when you type !commands ?

The problem appears to be the command is not showing up on your commands page. Are you sure you added it correctly?

simply added it it via nightbot.tv

Is there something else I should have done? thats all I have ever had to do

I can only recommend to try adding it again and if that doesn’t work then I guess ask for help from someone else. Because I don’t know why it wouldn’t work for any other reason.

Ty, I'll try again I did delete and re-add it earlier. Thanx a TON for all the help tho!

The commands shown to all are not matching what I have on the nightbot site. and all newly added commands are not shown either. As Potatoe mentioned this may be why the command isnt working?

Any advice please?

I feel like an idiot. I have an old YT account I was logged into via nightbot. all the commands were being added to a dead account. TY @Quirky Fox !

Didn't find your answer? The community is on Discord.

Ask on Discord