Telegram.Bot.Utils (telegram v2.1.0)

View Source

Bot utilities

Summary

Functions

Get the "from.user" field in an Update object, if present

Get the sent "date" field in an Update object, if present

Process name atom maker. Composed by Supervisor/GenServer/_ module name + bot behaviour module name

Functions

get_from_username(update)

@spec get_from_username(Telegram.Types.update()) :: {:ok, String.t()} | nil

Get the "from.user" field in an Update object, if present

get_sent_date(update)

@spec get_sent_date(Telegram.Types.update()) :: {:ok, DateTime.t()} | nil

Get the sent "date" field in an Update object, if present

name(module, token)

@spec name(module(), Telegram.Types.token()) :: atom()

Process name atom maker. Composed by Supervisor/GenServer/_ module name + bot behaviour module name