View Source TMI.ChannelServer (tmi.ex v0.5.0)

A GenServer for Channels that self-rate-limits joins.

options

Options

  • :rate (integer) - The rate at which to join channels. (one join per rate). Optional. Defaults to 500 ms.

twitch-authentication-and-join-rate-limits

Twitch authentication and join rate limits:

| Limit | Applies to |-------------------------------|--------------------------------------------- | 20 join attempts per 10 | Regular Twitch account | seconds per user | . | | . | 2000 join attempts per 10 | Verified bot | seconds per user | .

https://dev.twitch.tv/docs/irc/guide#rate-limits

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Invoked to handle asynchronous cast/2 messages.

Invoked to handle all other messages.

Invoked when the server is started. start_link/3 will block until it returns.

Add a channel to the JOIN queue.

Get the bot-specific ChannelServer module name.

PART from a channel.

Start the channel server.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Invoked to handle asynchronous cast/2 messages.

Invoked to handle all other messages.

For example calling Process.send_after(self(), :foo, 1000) would send :foo after one second, and we could match on that here.

Invoked when the server is started. start_link/3 will block until it returns.

Specs

join(module(), String.t()) :: :ok

Add a channel to the JOIN queue.

Specs

module_name(module()) :: module()

Get the bot-specific ChannelServer module name.

Specs

part(module(), String.t()) :: :ok

PART from a channel.

Specs

start_link({module(), TMI.Conn.t()}) :: GenServer.on_start()

Start the channel server.