Is there a way to pic a random sentence that the nightbot says like every 5 minutes?
First go to https://pastebin.com and upload your sentences. Look at my example (https://pastebin.com/raw/bbGr2ETq) to see how to format your sentences. Use "
to surround each sentence, and use ,
to separate each sentence. Copy the following text, replace my Pastebin link with the one you just created (use the raw link), and then enter it into your chat:
!commands add !randomsentence $(eval sentencesString=decodeURIComponent("$(querystring [$(urlfetch json https://pastebin.com/raw/bbGr2ETq)])");try{sentences=JSON.parse(sentencesString);sentences.length?sentences[Math.floor(Math.random()*sentences.length)]:`No sentences: ${sentencesString}`.substr(0,400)}catch(e){`Failed to parse sentences: ${e}: ${sentencesString}`.substr(0,400)})
Now go to https://beta.nightbot.tv/timers and sign in. Then click “Add” in the top right. Fill the fields with this information:
Name: Random Sentence
Message: !randomsentence
Interval: every 5 minutes
Chat Lines: 2 lines
Alias: !randomsentence
Then click submit.
Now Nightbot will send a random sentence every 5 minutes as long as 2 chat lines have been sent in the last 5 minutes.
Thank you very much!!!
But I cant type all this Code in the Chat! i use yt. and the Maximum Chat length is 200 letters. Is there an other way to do this?
thats also not working it is also too Long! what can i do?
It’s not too long. The command is only 353 characters. The maximum is 500.
$(eval sentencesString=decodeURIComponent("$(querystring [$(urlfetch json https://pastebin.com/raw/bbGr2ETq)])");try{sentences=JSON.parse(sentencesString);sentences.length?sentences[Math.floor(Math.random()*sentences.length)]:`No sentences: ${sentencesString}`.substr(0,400)}catch(e){`Failed to parse sentences: ${e}: ${sentencesString}`.substr(0,400)})
But when i try to paste it, it stops in the middle of the command! let me try again! it has to be in the field message, right?
Yes, you enter the command in the Message field.
It stops at Math.random
Then something is wrong with your browser. Try a different browser.
Ist not working!! I tried every Browser
Try on another computer.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.