View Source TMI.ChannelServer (tmi.ex v0.7.0)
A GenServer for Channels that self-rate-limits joins.
Options
:rate
(integer) - The rate at which to join channels. (one join perrate
). Optional. Defaults to500
ms.
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 |
Summary
Functions
Returns a specification to start this module under a supervisor.
Invoked to handle synchronous call/3
messages. call/3
will block until a
reply is received (unless the call times out or nodes are disconnected).
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.
List the channels that we have joined.
Get the bot-specific ChannelServer module name.
PART from a channel.
Start the channel server.
Update the moderator status of a mod for a channel.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Invoked to handle synchronous call/3
messages. call/3
will block until a
reply is received (unless the call times out or nodes are disconnected).
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.
Add a channel to the JOIN queue.
List the channels that we have joined.
Get the bot-specific ChannelServer module name.
PART from a channel.
@spec start_link({module(), TMI.Conn.t(), boolean(), [String.t()]}) :: GenServer.on_start()
Start the channel server.
Update the moderator status of a mod for a channel.