{"create_group_chat",{ca_string,ca_user,ca_period,ca_none},do_create_group_chat,"create_group_chat <name> <user>+\tCreates group chat with users",NULL},
{"create_secret_chat",{ca_user,ca_none},do_create_secret_chat,"create_secret_chat <user>\tStarts creation of secret chat",NULL},
{"del_contact",{ca_user,ca_none},do_del_contact,"del_contact <user>\tDeletes contact from contact list",NULL},
{"dialog_list",{ca_number|ca_optional,ca_number|ca_optional,ca_none},do_dialog_list,"dialog_list [limit=100] [offset=0]\tList of last conversations",NULL},
{"export_card",{ca_none},do_export_card,"export_card\tPrints card that can be imported by another user with import_card method",NULL},
{"export_chat_link",{ca_chat,ca_none},do_export_chat_link,"export_chat_link\tPrints chat link that can be used to join to chat",NULL},
{"fwd",{ca_peer,ca_number,ca_period,ca_none},do_fwd,"fwd <peer> <msg-id>+\tForwards message to peer. Forward to secret chats is forbidden",NULL},
{"fwd_media",{ca_peer,ca_number,ca_none},do_fwd_media,"fwd_media <peer> <msg-id>\tForwards message media to peer. Forward to secret chats is forbidden. Result slightly differs from fwd",NULL},
{"get_message",{ca_number,ca_none},do_get_message,"get_message <msg-id>\tGet message by id",NULL},
{"fwd",{ca_peer,ca_msg_id,ca_period,ca_none},do_fwd,"fwd <peer> <msg-id>+\tForwards message to peer. Forward to secret chats is forbidden",NULL},
{"fwd_media",{ca_peer,ca_msg_id,ca_none},do_fwd_media,"fwd_media <peer> <msg-id>\tForwards message media to peer. Forward to secret chats is forbidden. Result slightly differs from fwd",NULL},
{"get_message",{ca_msg_id,ca_none},do_get_message,"get_message <msg-id>\tGet message by id",NULL},
{"get_self",{ca_none},do_get_self,"get_self \tGet our user info",NULL},
{"help",{ca_none},do_help,"help\tPrints this help",NULL},
{"history",{ca_peer,ca_number|ca_optional,ca_number|ca_optional,ca_none},do_history,"history <peer> [limit] [offset]\tPrints messages with this peer (most recent message lower). Also marks messages as read",NULL},
{"import_card",{ca_string,ca_none},do_import_card,"import_card <card>\tGets user by card and prints it name. You can then send messages to him as usual",NULL},
{"import_chat_link",{ca_string,ca_none},do_import_chat_link,"import_chat_link <hash>\tJoins to chat by link",NULL},
{"load_audio",{ca_number,ca_none},do_load_audio,"load_audio <msg-id>\tDownloads file to downloads dirs. Prints file name after download end",NULL},
{"load_audio",{ca_msg_id,ca_none},do_load_audio,"load_audio <msg-id>\tDownloads file to downloads dirs. Prints file name after download end",NULL},
{"load_chat_photo",{ca_chat,ca_none},do_load_user_photo,"load_chat_photo <chat>\tDownloads file to downloads dirs. Prints file name after download end",NULL},
{"load_document",{ca_number,ca_none},do_load_document,"load_document <msg-id>\tDownloads file to downloads dirs. Prints file name after download end",NULL},
{"load_document_thumb",{ca_number,ca_none},do_load_document_thumb,"load_document_thumb <msg-id>\tDownloads file to downloads dirs. Prints file name after download end",NULL},
{"load_file",{ca_number,ca_none},do_load_file,"load_file <msg-id>\tDownloads file to downloads dirs. Prints file name after download end",NULL},
{"load_file_thumb",{ca_number,ca_none},do_load_file_thumb,"load_file_thumb <msg-id>\tDownloads file to downloads dirs. Prints file name after download end",NULL},
{"load_photo",{ca_number,ca_none},do_load_photo,"load_photo <msg-id>\tDownloads file to downloads dirs. Prints file name after download end",NULL},
{"load_document",{ca_msg_id,ca_none},do_load_document,"load_document <msg-id>\tDownloads file to downloads dirs. Prints file name after download end",NULL},
{"load_document_thumb",{ca_msg_id,ca_none},do_load_document_thumb,"load_document_thumb <msg-id>\tDownloads file to downloads dirs. Prints file name after download end",NULL},
{"load_file",{ca_msg_id,ca_none},do_load_file,"load_file <msg-id>\tDownloads file to downloads dirs. Prints file name after download end",NULL},
{"load_file_thumb",{ca_msg_id,ca_none},do_load_file_thumb,"load_file_thumb <msg-id>\tDownloads file to downloads dirs. Prints file name after download end",NULL},
{"load_photo",{ca_msg_id,ca_none},do_load_photo,"load_photo <msg-id>\tDownloads file to downloads dirs. Prints file name after download end",NULL},
{"load_user_photo",{ca_user,ca_none},do_load_user_photo,"load_user_photo <user>\tDownloads file to downloads dirs. Prints file name after download end",NULL},
{"load_video",{ca_number,ca_none},do_load_video,"load_video <msg-id>\tDownloads file to downloads dirs. Prints file name after download end",NULL},
{"load_video_thumb",{ca_number,ca_none},do_load_video_thumb,"load_video_thumb <msg-id>\tDownloads file to downloads dirs. Prints file name after download end",NULL},
{"load_video",{ca_msg_id,ca_none},do_load_video,"load_video <msg-id>\tDownloads file to downloads dirs. Prints file name after download end",NULL},
{"load_video_thumb",{ca_msg_id,ca_none},do_load_video_thumb,"load_video_thumb <msg-id>\tDownloads file to downloads dirs. Prints file name after download end",NULL},
{"main_session",{ca_none},do_main_session,"main_session\tSends updates to this connection (or terminal). Useful only with listening socket",NULL},
{"mark_read",{ca_peer,ca_none},do_mark_read,"mark_read <peer>\tMarks messages with peer as read",NULL},
{"msg",{ca_peer,ca_msg_string_end,ca_none},do_msg,"msg <peer> <text>\tSends text message to peer",NULL},
{"reply_photo",{ca_msg_id,ca_file_name,ca_string_end|ca_optional,ca_none},do_reply_photo,"reply_photo <msg-id> <file> [caption]\tSends photo to peer",NULL},
//{"reply_text", {ca_number, ca_file_name_end, ca_none}, do_reply_text, "reply_text <msg-id> <file>\tSends contents of text file as plain text message", NULL},
{"reply_video",{ca_number,ca_file_name,ca_none},do_reply_video,"reply_video <msg-id> <file>\tSends video to peer",NULL},
{"reply_video",{ca_msg_id,ca_file_name,ca_none},do_reply_video,"reply_video <msg-id> <file>\tSends video to peer",NULL},
{"resolve_username",{ca_string,ca_none},do_resolve_username,"resolve_username username\tSearches user by username",NULL},
//{"restore_msg", {ca_number, ca_none}, do_restore_msg, "restore_msg <msg-id>\tRestores message. Only available shortly (one hour?) after deletion", NULL},
{"safe_quit",{ca_none},do_safe_quit,"safe_quit\tWaits for all queries to end, then quits",NULL},
{"user_info",{ca_user,ca_none},do_user_info,"user_info <user>\tPrints info about user (id, last online, phone)",NULL},
{"view_audio",{ca_number,ca_none},do_open_audio,"view_audio <msg-id>\tDownloads file to downloads dirs. Then tries to open it with system default action",NULL},
{"view_audio",{ca_msg_id,ca_none},do_open_audio,"view_audio <msg-id>\tDownloads file to downloads dirs. Then tries to open it with system default action",NULL},
{"view_chat_photo",{ca_chat,ca_none},do_view_user_photo,"view_chat_photo <chat>\tDownloads file to downloads dirs. Then tries to open it with system default action",NULL},
{"view_document",{ca_number,ca_none},do_open_document,"view_document <msg-id>\tDownloads file to downloads dirs. Then tries to open it with system default action",NULL},
{"view_document_thumb",{ca_number,ca_none},do_open_document_thumb,"view_document_thumb <msg-id>\tDownloads file to downloads dirs. Then tries to open it with system default action",NULL},
{"view_file",{ca_number,ca_none},do_open_file,"view_file <msg-id>\tDownloads file to downloads dirs. Then tries to open it with system default action",NULL},
{"view_file_thumb",{ca_number,ca_none},do_open_file_thumb,"view_file_thumb <msg-id>\tDownloads file to downloads dirs. Then tries to open it with system default action",NULL},
{"view_document",{ca_msg_id,ca_none},do_open_document,"view_document <msg-id>\tDownloads file to downloads dirs. Then tries to open it with system default action",NULL},
{"view_document_thumb",{ca_msg_id,ca_none},do_open_document_thumb,"view_document_thumb <msg-id>\tDownloads file to downloads dirs. Then tries to open it with system default action",NULL},
{"view_file",{ca_msg_id,ca_none},do_open_file,"view_file <msg-id>\tDownloads file to downloads dirs. Then tries to open it with system default action",NULL},
{"view_file_thumb",{ca_msg_id,ca_none},do_open_file_thumb,"view_file_thumb <msg-id>\tDownloads file to downloads dirs. Then tries to open it with system default action",NULL},
{"view_photo",{ca_number,ca_none},do_open_photo,"view_photo <msg-id>\tDownloads file to downloads dirs. Then tries to open it with system default action",NULL},
{"view_user_photo",{ca_user,ca_none},do_view_user_photo,"view_user_photo <user>\tDownloads file to downloads dirs. Then tries to open it with system default action",NULL},
{"view_video",{ca_number,ca_none},do_open_video,"view_video <msg-id>\tDownloads file to downloads dirs. Then tries to open it with system default action",NULL},
{"view_video_thumb",{ca_number,ca_none},do_open_video_thumb,"view_video_thumb <msg-id>\tDownloads file to downloads dirs. Then tries to open it with system default action",NULL},
{"view",{ca_number,ca_none},do_open_any,"view <msg-id>\tTries to view message contents",NULL},
{"view_video",{ca_msg_id,ca_none},do_open_video,"view_video <msg-id>\tDownloads file to downloads dirs. Then tries to open it with system default action",NULL},
{"view_video_thumb",{ca_msg_id,ca_none},do_open_video_thumb,"view_video_thumb <msg-id>\tDownloads file to downloads dirs. Then tries to open it with system default action",NULL},
{"view",{ca_msg_id,ca_none},do_open_any,"view <msg-id>\tTries to view message contents",NULL},
{"visualize_key",{ca_secret_chat,ca_none},do_visualize_key,"visualize_key <secret chat>\tPrints visualization of encryption key (first 16 bytes sha1 of it in fact}",NULL}