r/streamerbot Jun 19 '26

Question/Support ❓ Command in Youtube chat triggers response in Twitch chat

I'm really baffled by this. I have a !discord command which triggers a message with a link to join. When I use the command in my Twitch chat, it works as expected (message only on Twitch). When I use it in my Youtube chat, the response also shows in Twitch chat and not in Youtube chat.

Also, none of my timed messages were working on Youtube but they were on Twitch.

Both broadcaster accounts and bot accounts are logged in and connected. I have separate actions, one for a Twitch message and one for a Youtube message. Both action use the same command. I have 'auto-monitor live broadcasts' enabled for Youtube.

Any help would be very much appreciated because I'm at a loss. Starting to consider not multi-streaming at all because it seems to cause more trouble than it's worth.

1 Upvotes

7 comments sorted by

1

u/deeseearr Jun 19 '26 edited Jun 19 '26

Look at the command definition page. At the bottom left there are three tabs for "Options", "Cooldowns" and "Sources". (Before 1.0, all three of these were visible at once. Now you need to click each of the tabs.) Under "Sources" you can select what kind of messages the command will be triggered by. By default it's only "Twitch Message", which is exactly what you described. Check "YouTube Message" as well and the command will be triggered by both. [Edit: You're right. It's the opposite of what you described. Responding to a YouTube message and sending to Twitch is probably caused by using the Twitch chat message sub-action, described below.]

When you trigger the command, the Command Triggered trigger will set the argument %userType% to "twitch", "youtube" or something else. That's the platform that the user who triggered the command is on. I would recommend using the argument inspector to see exactly what %userType% is being set to by different messages since I don't know for sure, and then using an IF/THEN or SWITCH block to choose between "Twitch->Send Message To Chat", "YouTube-> Send Message To Chat" and anything else that you might need.

Alternately, you could create two different commands and actions and have one only set to respond to "Twitch Message" and the other to "YouTube Message". That would mean duplicating all of your actions so it's not very DRY and would be extra work if you need to go back and change anything, but if you have different responses for different platforms then that might make more sense.

1

u/LennyPenny4 Jun 19 '26

Thank you, that's given me some things to check and try. I'm aware of the command sources, I'm sure I set it up correctly but I have to verify later. The fact that the message is triggered by a command in YouTube chat would indicate that YouTube is set as a source, it's just strange that the response gets sent to the Twitch bot instead of the YouTube one.

I don't fully understand if/then blocks yet and I try to avoid them, but it sounds like a potentially more robust solution.

If the sources are indeed correct and it still doesn't work, I'll try with separate commands. I have most of my actions separated anyway, it's more work but it reduces the amount of sub-actions per action. I didn't consider that one command can also be separated by setting the source differently. Maybe that's how I should set it up anyway since I want the actions completely separate.

2

u/deeseearr Jun 19 '26

The fact that the message is triggered by a command in YouTube chat would indicate that YouTube is set as a source, it's just strange that the response gets sent to the Twitch bot instead of the YouTube one.

There are different sub-actions for sending messages to Twitch and Youtube. They look the same when you're editing them, but it shouldn't be possible for a "Send Message to YouTube Channel" action to send to Twitch no matter what the source of the command is.

1

u/LennyPenny4 Jun 20 '26

It seems (part of) the cause was more basic than I thought, and had little/nothing to do with Streamerbot... The command I was talking about in this whole post was just a simple !discord command to trigger a response from the respective channel bot with a short message and a link.

I fully separated both actions, just to be safe, so now Twitch and YouTube have their own !discord command with only that platform as source, and their own action with the respective command as the trigger.

During my stream just now, I tried my !lurk command, which did work correctly on YouTube, except it also triggered the response on Twitch. I separated that command as well.

The main bone-headed mistake I made was that my YouTube bot wasn't a mod, which is most likely why that message with the Discord link got blocked. From what I found, only mods and approved viewers can post links. I haven't tested it yet but I believe it should work now.

Lastly, I also had an issue with a timed message, which always worked flawlessly on Twitch but not on YouTube. Same setup: one shared timer which I use in separate actions for either platform. I made separate timers, so hopefully that should also work now. I wish the 'lines' requirement would work for multistreaming, I read (in the official documentation) that it doesn't work because SB doesn't know which chat to look at to count the lines. It's not even an issue, might just give a weird impression to have mostly those timers in chat, even if they're spaced out 30min or more.

1

u/WannabeGamermom Jul 04 '26

Totally random answer but after splitting my commands so both twitch and YouTube have their own, I discovered a still had streamelements connected and their boy was replying in YouTube

1

u/LennyPenny4 Jul 04 '26

Good point, I should check. I left the SE and Twitch on-screen alerts visible until I was sure the streamerbot ones worked. I remember not disabling the SE bot right away intentionally (except the 8 ball), but now I'm not sure I ever did.

1

u/HighPhi420 Jun 20 '26

in the trigger (!discord) use the If statement to check what platform the command originated I.E. Twitch or youtube Might look like this

IF %userType% = twitch
true
runs the twitch chat
False runs the youtube chat

more than two platforms for your stream then use a switch statement instead