{"chat_with_peer",{ca_peer,ca_none},do_chat_with_peer,"chat_with_peer <peer>\tInterface option. All input will be treated as messages to this peer. Type /quit to end this mode",NULL},
{"clear",{ca_none},do_clear,"clear\tClears all data and exits. For debug.",NULL},
{"contact_search",{ca_string,ca_number|ca_optional,ca_none},do_contact_search,"contact_search username [limit]\tSearches contacts by username",NULL},
{"contact_search",{ca_string,ca_none},do_resolve_username,"contact_search username\tSearches user by username",NULL},
{"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},
{"reply_photo",{ca_number,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},
{"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},
{"search",{ca_peer|ca_optional,ca_number|ca_optional,ca_number|ca_optional,ca_number|ca_optional,ca_number|ca_optional,ca_string_end},do_search,"search [peer] [limit] [from] [to] [offset] pattern\tSearch for pattern in messages from date from to date to (unixtime) in messages with peer (if peer not present, in all messages)",NULL},