subscribe

suspend fun subscribe(subscription: EventSubSubscriptionType)

Registers a subscription to be created on the current EventSub session.

If the WebSocket is already connected, the subscription is registered immediately. Otherwise it is stored and registered automatically when the next welcome message arrives. Subscriptions are re-registered on error-recovery reconnects but not on server-initiated reconnects (Twitch carries those over).