botlead v0.1.0 Botlead.Client

Use this module to connect existing client to chat session.

Link to this section Summary

Link to this section Functions

Link to this function

connect(client_module, bot_server, chat_id)

Start client instance for chat id.

Link to this function

connect(client_module, bot_server, chat_id, opts)

Link to this function

disconnect(client_module, bot_server, chat_id)
disconnect(module(), pid(), String.t()) :: :ok | :error

Remove client instance for chat id.

Link to this function

get_client_pid(client_module, chat_id)
get_client_pid(module(), String.t()) :: pid() | nil

Get pid for specific client id.

Link to this function

is_client_started?(client_module, chat_id)
is_client_started?(module(), String.t()) :: boolean()

Check if client was started for specific client id.

Link to this function

parse_message(pid, message, opts \\ [])
parse_message(pid(), map(), Keyword.t()) :: :ok

Make client connection recieve some new message.

Link to this function

parse_message(client_module, chat_id, message, opts)
parse_message(module(), String.t(), map(), Keyword.t()) :: :ok