tmi.ex v0.3.0 TMI View Source

TMI is a library for connecting to Twitch chat with Elixir.

See the README for more details.

Link to this section Summary

Functions

Send an action message to a chat.

Determine if a user is present in the provided chat.

Get a list of users in the provided chat.

Returns a specification to start this module under a supervisor.

Determine if the client process has an open connection to a server.

Determine if the client is logged on to a server.

Send a chat message.

Start the TMI process.

Start the TMI supervisor process.

Send a whisper message to a user.

Link to this section Functions

Specs

action(String.t(), String.t()) :: :ok

Send an action message to a chat.

Link to this function

chat_has_user?(chat, user)

View Source

Specs

chat_has_user?(chat :: String.t(), user :: String.t()) ::
  true | false | {:error, atom()}

Determine if a user is present in the provided chat.

Notes:

  • requires membership capability to show more than yourself
  • requires you are in the chat or an error will be raised

Specs

chat_users(chat :: String.t()) :: [String.t()] | [] | {:error, atom()}

Get a list of users in the provided chat.

Notes:

  • requires membership capability to show more than yourself
  • requires you are in the chat or an error will be raised

Returns a specification to start this module under a supervisor.

See Supervisor.

Specs

is_connected?() :: true | false

Determine if the client process has an open connection to a server.

Specs

is_logged_on?() :: true | false

Determine if the client is logged on to a server.

Specs

message(String.t(), String.t()) :: :ok

Send a chat message.

Specs

start_link(TMI.Conn.t() | keyword()) :: {:ok, pid()}

Start the TMI process.

Link to this function

supervisor_start_link(config)

View Source

Specs

supervisor_start_link(keyword()) :: {:ok, pid()}

Start the TMI supervisor process.

Specs

whisper(String.t(), String.t()) :: :ok

Send a whisper message to a user.