GelotvBot.Adapter behaviour (GeloTVBot v0.1.0)

Copy Markdown View Source

Behaviour implemented by platform adapters.

A real Twitch, YouTube, or Kick integration belongs behind this behaviour. Adapters receive normalized GelotvBot.Target and GelotvBot.Message structs so the dispatch, supervision, metadata, and rate-limit layers stay platform-neutral.

Summary

Types

result()

@type result() ::
  :ok
  | {:ok, term()}
  | {:error, term()}
  | {:error,
     :rate_limited
     | {:rate_limited, non_neg_integer()}
     | :timeout
     | {:temporary, term()}}

Callbacks

send_message(t, t, keyword)

@callback send_message(GelotvBot.Target.t(), GelotvBot.Message.t(), keyword()) :: result()