Trying to bypass the character limit

So I’m trying to add a command that picks out a random place whenever someone puts !place and I think the problem is that it’s too long but I don’t want to get rid of any of the places are there any solutions?

$(eval a=[Catching Fire’s Arena,Marineford,The Bottom Of The Ocean,The Final Valley,Hogwarts,The Thousand Sunny,The Krusty Krab,Times Square,Star Killer Base,A Mountain,Boxing Ring,Central Yharnam,Champion Gundyr’s Stage (He’s trying to kill both of you),The Land Of Milk And Cookies,Disneyland,Movie Theater,A Big Ass Oreo Cookie,Dunder Mifflin,UA Sports Festival Stadium,A Chess Board,A Flat World With Nothing But Grass,Antarctica,Carnival,Water Park];a[Math.floor(Math.random()*a.length)])

Hey @cicerothemungo!

Yes, there’s a solution!

Create an account on Pastebin so you can come back to edit your command later, create a paste and make sure to set its expiration data to Never, here’s how to structure your paste:

Catching Fire's Arena;
Marineford;
The Bottom Of The Ocean;
...
Carnival;
Water Park

Notice how every line ends with a ; (semi-colon) except for the last one, this is important.

Then you command will look like this:

$(eval a=`$(urlfetch json https://pastebin.com/raw/XXXXXXXX)`.split(`;`);a[Math.floor(Math.random()*a.length)])

Replace XXXXXXXX by your paste ID.

It says error connecting to webeval service

Can you paste your command’s code, please? Otherwise we can’t help further.

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

Sorry I was updating my previous reply, your code seems fine. Nightbot had network issues today, but it should be resolved now, this may be why it didn’t work properly, do you still get the error message?

Not anymore thanks for the help

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