Firebot icon indicating copy to clipboard operation
Firebot copied to clipboard

[Feature Request] Raid Start and Raid Sendoff event triggers

Open TheGinGear opened this issue 2 years ago • 13 comments

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.

TheGinGear avatar Jun 04 '23 05:06 TheGinGear

I would like to work on the following:

I'll break it down for simplicity:

  1. We need a raid start event using EventSub.
  2. 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...

JoeruCodes avatar Jan 10 '24 03:01 JoeruCodes

There are currently no pending outgoing raid events on EventSub, so marking this as blocked.

zunderscore avatar Jan 10 '24 04:01 zunderscore

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

Wissididom avatar Jan 10 '24 07:01 Wissididom

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.

zunderscore avatar Jan 10 '24 14:01 zunderscore

I've updated my comment above to be more precise.

zunderscore avatar Jan 10 '24 14:01 zunderscore