View Source TMI.MessageServer (tmi.ex v0.7.0)
A GenServer for Sending messages at a specified rate to a single channel.
Options
:rate
(integer) - The rate at which to send the messages. (one message perrate
). Optional. Defaults to1500
ms.
Twitch command and message rate limits:
If command and message rate limits are exceeded, an application cannot send channel messages or commands for 30 minutes.
| Limit | Applies to
|-------------------------------|---------------------------------------------
| 20 per 30 seconds | Users sending commands or messages to
| | channels in which they are not the broadcaster
| | and do not have Moderator status.
| |
| 100 per 30 seconds | Users sending commands or messages to channels
| | in which they are the broadcaster or have
| | Moderator status.
| |
| 7500 per 30 seconds | Verified bots. The channel limits above also
| site-wide | apply. In other words, one of the two limits
| | above will also be applied depending on
| | whether the verified bot is the broadcaster
| | or has Moderator status.
Summary
Functions
Add a command to the outbound message queue.
Add a command to the outbound message queue.
Add a message to the outbound message queue.
Add a message to the outbound message queue.
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.
Generate the bot and channel specific module name.
Start the message server. Usually because of a JOIN
.
Stop the message server. Usually because of a PART
.
Stop the message server. Usually because of a PART
.
Generate the bot and channel specific module name.
Update the mod status of the bot for the channel.
Functions
Add a command to the outbound message queue.
Add a command to the outbound message queue.
Add a message to the outbound message queue.
Add a message to the outbound message queue.
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.
Generate the bot and channel specific module name.
@spec start_link({module(), String.t(), boolean(), TMI.Conn.t()}) :: GenServer.on_start()
Start the message server. Usually because of a JOIN
.
@spec stop(module()) :: :ok
Stop the message server. Usually because of a PART
.
Stop the message server. Usually because of a PART
.
Generate the bot and channel specific module name.
Update the mod status of the bot for the channel.