Copyright © (C) 2016, Sergey Prokhorov
Authors: Sergey Prokhorov (me@seriyps.ru).
update_type() = message | edited_message | channel_post | edited_channel_post | inline_query | chosen_inline_result | callback_query | shipping_query | pre_checkout_query
chat_id/2 | |
command_get_args/3 | Parses not more than NArgs command arguments. |
message_command/2 | Returns only 1st command. |
message_type/1 | Detect message type. |
object/2 | |
update_type/1 | Detect incoming update type. |
user/2 | gets User structure from an update. |
chat_id(UpdType::update_type(), Update::pe4kin:update()) -> {ok, pe4kin:chat_id()} | undefined
command_get_args(NArgs::non_neg_integer() | '*', Command::pe4kin:json_object(), Message::pe4kin:json_object()) -> [binary()]
Parses not more than NArgs
command arguments.
If NArgs
is '*', parses all arguments (until meet the end of the message or new line).
message_command(BotName::perkin:bot_name(), X2::pe4kin:json_object()) -> {Cmd::binary(), BotName::binary(), SentToMe::boolean(), Command::pe4kin:json_object()}
Returns only 1st command
message_type(X1) -> any()
Detect message type
object(Type::update_type(), Update::pe4kin:update()) -> {ok, pe4kin:json_object()} | error
update_type(X1::pe4kin:json_object()) -> update_type() | undefined
Detect incoming update type
user(Type::update_type(), Update::pe4kin:update()) -> {ok, pe4kin:json_object()} | error
gets User
structure from an update
Generated by EDoc