View Source TMI.WhisperServer (tmi.ex v0.5.1)

A GenServer for Sending whispers at a specified rate.

twitch-whispers-rate-limits

Twitch whispers rate limits:

If the Whisper rate limits are exceeded, an application cannot send Whispers for 24 hours.

Limit | Applies to ------------------------------------|----------------------------------------- 3 per second, up to 100 per minute, | All Twitch accounts for 40 accounts per day | .

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

Link to this section Summary

Functions

Add a whisper 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 specific module name.

Start the message server. Usually because of a JOIN.

Stop the message server. Usually because of a PART.

Link to this section Functions

Link to this function

add_whisper(bot, from, to, whisper)

View Source

Specs

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

Add a whisper 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.

Specs

module_name(module()) :: module()

Generate the bot specific module name.

Specs

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

Start the message server. Usually because of a JOIN.

Specs

stop(module()) :: :ok

Stop the message server. Usually because of a PART.