Connecting custom commands with chat alert?

Hi guys,

So I’ve been toying with chat alert for an idea I have which I didn’t know about until being informed by some friendly people at the Twitch subreddit.

I understand chat alert is kind of a joke, but is it possible for the functionality of it to be expanded slightly? What I would like to do is add custom commands to nightbot that will trigger alert popups in the stream.

I intend for this to give my stream audience a method of interacting with what appears on screen during stream. I may end up wanting various limitations down the line, such as subs only, or making it points based due to spam, but ultimately for the initial idea this is all I need.

Is there a way of doing this already? If not, is it possible for the nightbot team to make it real? Allowing the audience to play various on screen reaction animations is/would be amazing.

The chat alert notifier was mainly a joke and is unlikely to be expanded into anything greater.
As for the custom commands to be made as notifications…

No there is a not a current way to do this through Nightbot.
I feel it would be possible, however there are many other projects that Nightdev is working on.
And I feel that this would get very “spammy” over the course of it’s use.

If you looking for some sort of interaction you can use sounds for commands. This is also not possible with Nightbot. Here is Reddit Link if you need some more information.

Spammy is exactly what I’m going for.

Twitch chat at 2000+ users is a crowd, like a literal theatre or stadium. They cheer together, they roar together, they chant together, they’re exactly the same.

My goal is to give that crowd a visual representation within the stream itself. When something exciting happens I want to visually see and hear the outcome of 800 viewers typing !cheer simultaneously causing rapturous applause on the stream. Or 500 people simultaneously typing !fail as laughter animations play. (All of this occurring in the areas on screen that don’t obstruct gameplay).

Yes it’ll be messy. Yes the idea will need fine tuning to get volume levels to work, such as volume of the commands being significantly louder when 500 people all get excited at once versus just 1 or 2 silly people spamming it alone.

Chat is just white noise right now. Their contribution to the stream can’t get any worse or spammier than displaying the things they write directly on the stream. What I’d like to do is take chat and make it a useful, real part of the stream while simultaneously giving viewers something that’s a little more engaging than the current spamfest of chats when they’re too full.

I think I probably explained it poorly in the original post.

I like your idea, I had the same idea a while ago :wink:
And its possible… but you will need some scripting knowledge.
But I can explain how I did it and hopefully you can learn something of it.

I made a command in nigtbot when a user entered this command, an image would display on screen.
How I did it? First you need to make a custom api command to your script on your server which will add a row to your database. I stored the data in my database like this: user | type image | date | finished. Then you need a second script on your server which will check every X seconds to see if there are new rows in the database. If there are new rows, show them, update the rows to status finished and repeat. You enter this second script in your CLR browser in OBS and then it should work.

If you have any questions about it let me know.

Edit: For big channels you definitely have to tweek some things, but for example you can make something like in there are 10 new rows in the database with !fail, or 20 new rows with !fail that a different thing will shown.

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

That sounds pretty much perfect xgerhard. There’ll be some things to add on top of it, but it’s the perfect foundation of what I wanted to do.

I’ve got some experience. What you’re describing sounds like polling?

If you’ve got this already setup somewhere I would categorically love you for providing a base to mess with, otherwise I’ll definitely start doing the legwork to get it up and running with guidance. I don’t have experience with what specifically works with Nightbot’s custom API commands so I’ll have to mess around there when I’ve got time.

Would you be ok with sharing? <3

I can share some code with you, but you have to find some place where you can host and test this. The code has been used a while ago in a stream with max 10 viewers, so you really need to test if it is going to work in a big stream, since nightbot will ignore the same command if it is used again in 20 secs.

It’s not the best written code, I just wanted to try it out, but hopefully you can learn something from it.

You will need a command for nightbot, lets say for example you want to display a fail image:

!addcom !fail $(customapi http:/$(user))

Img_json.php: Click here
This script will handle the inserts and shows what image to show on screen. Read the comments in the script.

img.php: Click here
This is the script you need to add to your CLR Browser to actually show the image.

Hopefully this is usefull, and if you have any questions let me know.

Thanks man, this is a great base. I’ve got a couple of servers this will work with. I’ve got free time this weekend so I’ll have a proper dig around with it then.

Just so you’re aware, I also ran into another person that’s working on a similar project right now. is working on it, if you check his past broadcasts you can find a lot of the work he’s put in.

Found via this:

I’ve tried to contact him but have failed so far.

1 Like

Alright good luck! Yeah maybe if you can reach him, you can try it out together.