HELP:Command taking a random name from a list when asked

Hey guys,
i looked online for a way to make nightbot answer to !smash by randomly taking a name from a list but i cant find any way that works with more than 400 characters, my list being over 30 elements long as well. Thanks a whole lot

Separate your names by , and upload them to https://pastebin.com like this: https://pastebin.com/raw/hGMJffVt

Then enter this into your chat (replace my raw Pastebin link with yours):

!commands add !smash $(eval names = decodeURIComponent(`$(querystring $(urlfetch json https://pastebin.com/raw/hGMJffVt))`).split(","); names[Math.floor(Math.random() * names.length)])

You can use a different character to separate the names as long as you change , in the command.

1 Like

Brilliant its working thanks a whole lot!

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