Detect Stream Together information of 2 streamers

Hello,

I have 2 streamers using my irc chat bot, who are also doing Stream Together with Shared Chat. My chat bot sends some messages periodically. So both streamers receive a identical message. And since chat is shared the message shows 2 times across both chats.

I was thinking about implementing a strategy to avoid this. But I could not find a way to detect
if streamers (known user ids) are using Stream Together with Shared Chat.
Does the API offer a way to fetch this information?

Thanks!

You can use the Get Shared Chat Session endpoint to see if there is a current shared chat session.

With IRC you’re somewhat limited in terms of control over shared chat, but sending messages with the Send Chat Message endpoint allows you to set a for_source_only to control if a message goes to just the channel it’s being sent in, or every channel in a shared chat session. Depending on your use case this may or may not be a suitable option but it is one way for bots to control how messages are distributed.

Aside from using Get Shared Chat Session,

Over “pure” IRC you’ll see shared chat related tags in messages recieved over chat. So if receiving those populated tags, you’ll know that shared chat is on.

Using this approach is clunky however since you’ll hold a “cached status in memory”, but the optimal solution is using for_source_only with the send chat API and an App Access/Client Credentails token (along with the related oAuth scopes)