View Source TwitchEventSub.Handler behaviour (hello_twitch_eventsub v0.3.0)

The behaviour and implementation of EventSub.

Example implementation

defmodule ExampleHandler do
  use TwitchEventSub.Handler

  @impl TwitchEventSub.Handler
  def handle_event("channel.follow", event) do
    # Do something with a follow.
  end
end

Summary

Callbacks

Handle events from Twitch EventSub.

Callbacks

Link to this callback

handle_event(type, event)

View Source
@callback handle_event(type :: String.t(), event :: map()) :: any()

Handle events from Twitch EventSub.