Get More Engagement with Random Phrase Commands in Nightbot
Вставка
- Опубліковано 10 сер 2023
- Want to build some fun commands where the output isn't always exactly the same?
With the help of the $eval construct and a little bit of javascript, we can do this easily in Nighbot. Don't be scared, you don't have to write the javascript yourself.
This video will walk us through how to get this set up.
If you haven't set up nightbot yet, watch this video first:
• Nightbot Setup and Wal...
for copy/pasta needs, here's the command:
$(user) summons a forest creature and $(eval const animals = ['a fox','a bear','an owl','a deer']; animals[Math.floor(Math.random() * animals.length)];) appears.
🔥 Subscribe here! bit.ly/phlare_subscribe
🔴 Watch Phlare Live: bit.ly/phlare_twitch
===== Quick Links =====
Nightbot Homepage: nightbot.tv/
Nightbot Tutorials: • Nightbot
📼 More Streamer Tutorials: bit.ly/phlare_tutorials
🤖 Streamer.bot software: streamer.bot/
➤ OBS Studio: obsproject.com/
♪ Epidemic Sound - Royalty Free Music + SFX: bit.ly/phlare_es
===== Socials =====
🔥 Join Phlare's Discord: bit.ly/phlare_discord
👕 Phlare's Merch: bit.ly/phlare_shop
👑 Phlare's Throne Wishlist: bit.ly/phlare_throne
🐦 Twitter: bit.ly/phlare_twitter
🗪 Phlare's other socials: bit.ly/phlare_linktre
===== Affordable Streaming Gear for Beginners* =====
🎥 Elgato FaceCam: amzn.to/3KDqJjb
🎤 HyperX Solocast: amzn.to/3ONUD6F
🎤 Cheap Boom Arm: amzn.to/47pwYRf
🎤 Pop Filter for Mic: amzn.to/3DTWcKe
🚨 Programmable RGB Floodlights: amzn.to/3QS6pP5
*As an Amazon Associate I earn from qualifying purchases.
Music provided by Monstercat:
Nigel Good - An Adventure
/ monstercatinstinct
#nightbot #chatbot #randomwords - Навчання та стиль
What kind of random chaos will you create with this? Let me know! subscribe for more: bit.ly/phlare_subscribe more nightbot tutorials here: ua-cam.com/play/PLYmGgQAaCW_9XCY7375LBb-RBFFkf3bXn.html
top shelf stuff as always!
Thanks heroic
if i add a link to pinterest for them to click to see the creature they pulled, will that mess up the code? I know it will add more characters, so that may be the issue! Thank you!
Main issue is going to be total length of the command. Maybe use bit.ly or something to shorten the links (or maybe Pinterest already has its own short links)
Do you also have video on if else statement? Also, can the command remembers previous statement's result and react based on that result?
For example, the first statement is randomly picking success statement and failure statement, then the next sentence will randomly pick a phrase or outcome for success or failure.
Could do basic if else logic with nightbot because it allows raw JavaScript, but anything too complex and you’re gonna want to use a more advanced bot like streamer.bot
Depending on what you’re trying to do we may be able to work it out in nightbot but the 500 character limit makes things tricky.
@@Phlarethank you for your help. I found easier way to get the bot to do what I wanted.
interesting
Got some gears turning?
it did it did @@Phlare
i copied and pasted this command but replaced it with different types of bears & testing it in obs tells me "summons a bear and Unexpected identifier 's' [:1:249] appears." not sure what im doing wrong :')
OOO as soon as i commented this, i noticed one of the animal names had a comma in it, which messed with the code. lolol gotta watch for those
@@frillygames oh good catch. Yeah apostrophes and quotes will throw everything off. Did you get it sorted out?
@@Phlare yess! It works perfectly now! Couldn’t have done it without this video!! Thank you :)
Also having this problem but there are no extra commas or anything, I did exactly as pasted, why won’t it work?
@@sunnyjc5260only thing o can suggest is typing the single quotes by hand. Seems like copy paste really messes up quotes and apostrophes sometimes.