mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-08-27 17:52:21 +02:00
Add setMyShortDescription.
This commit is contained in:
parent
8ee91caacf
commit
8fd2a69378
@ -208,6 +208,7 @@ bool Client::init_methods() {
|
||||
methods_.emplace("getmydescription", &Client::process_get_my_description_query);
|
||||
methods_.emplace("setmydescription", &Client::process_set_my_description_query);
|
||||
methods_.emplace("getmyshortdescription", &Client::process_get_my_short_description_query);
|
||||
methods_.emplace("setmyshortdescription", &Client::process_set_my_short_description_query);
|
||||
methods_.emplace("getchatmenubutton", &Client::process_get_chat_menu_button_query);
|
||||
methods_.emplace("setchatmenubutton", &Client::process_set_chat_menu_button_query);
|
||||
methods_.emplace("getuserprofilephotos", &Client::process_get_user_profile_photos_query);
|
||||
@ -7883,6 +7884,14 @@ td::Status Client::process_get_my_short_description_query(PromisedQueryPtr &quer
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
||||
td::Status Client::process_set_my_short_description_query(PromisedQueryPtr &query) {
|
||||
auto language_code = query->arg("language_code");
|
||||
auto short_description = query->arg("short_description");
|
||||
send_request(make_object<td_api::setBotInfoShortDescription>(language_code.str(), short_description.str()),
|
||||
td::make_unique<TdOnOkQueryCallback>(std::move(query)));
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
||||
td::Status Client::process_get_chat_menu_button_query(PromisedQueryPtr &query) {
|
||||
if (query->has_arg("chat_id")) {
|
||||
TRY_RESULT(user_id, get_user_id(query.get(), "chat_id"));
|
||||
|
@ -512,6 +512,7 @@ class Client final : public WebhookActor::Callback {
|
||||
td::Status process_get_my_description_query(PromisedQueryPtr &query);
|
||||
td::Status process_set_my_description_query(PromisedQueryPtr &query);
|
||||
td::Status process_get_my_short_description_query(PromisedQueryPtr &query);
|
||||
td::Status process_set_my_short_description_query(PromisedQueryPtr &query);
|
||||
td::Status process_get_chat_menu_button_query(PromisedQueryPtr &query);
|
||||
td::Status process_set_chat_menu_button_query(PromisedQueryPtr &query);
|
||||
td::Status process_get_user_profile_photos_query(PromisedQueryPtr &query);
|
||||
|
Loading…
Reference in New Issue
Block a user