Firebot
Firebot copied to clipboard
[Feature Request] Raid Start and Raid Sendoff event triggers
Adding two new Event Triggers: The start of raiding someone else, and the send off of a raid to another channel.
Additional context The ability to have events happen when you start a raid and when the raid actually sends off would be nice. For example, OBS ending the stream 5 seconds after the raid is sent off so you don't have to manually, and worry about forgetting. Pop ups and alerts of the raid-ee on screen, when you first start the raid countdown; like swapping scenes and showing clips of the person you're going to raid, or just credits when you start raiding off.
I would like to work on the following:
I'll break it down for simplicity:
- We need a raid start event using EventSub.
- Additionally, we might need a raid completion event. However, there is an issue since there is currently no documentation available in the Twitch API which explicitly mentions a sent off raid event in the EventSub, as far as my knowledge extends...
One potential approach is to implement a start raid event using EventSub. Then, upon receiving a completion notification, we can proceed to trigger the raid completion event...
Basically, we can define the completion notification as follows: an event which is first made live on a raid started event and then its triggered during a sudden efflux of users...
There are currently no pending outgoing raid events on EventSub, so marking this as blocked.
But I'm already doing that in my Custom Script:
let apiClient = runRequest.modules.twitchApi.getClient();
await apiClient.eventSub.createSubscription(
"channel.raid",
"1",
{
from_broadcaster_user_id: runRequest.firebot.accounts.streamer.userId,
},
{
method: "websocket",
session_id: websocket_session_id_from_welcome_payload
},
runRequest.firebot.accounts.streamer.userId,
);
I just don't know how to differentiate between Start and Sendoff with that subscription type. Not sure, but I think this is just the Sendoff.
So I think that it would just need a second EventSub subscription on channel.raid with from_broadcaster_user_id instead of to_broadcaster_user_id.
Documentation: https://dev.twitch.tv/docs/eventsub/eventsub-subscription-types/#channelraid
That tells us that the raid has occurred, so we might be able to setup a sendoff event from it, but there is still no event that tells us a raid is starting.
I've updated my comment above to be more precise.