mirror of
https://github.com/PaiGramTeam/telegram-bot-api.git
synced 2024-11-26 10:16:29 +00:00
Add setMyName.
This commit is contained in:
parent
a894cace6b
commit
38a11d1e1f
@ -206,6 +206,7 @@ bool Client::init_methods() {
|
|||||||
methods_.emplace("getmydefaultadministratorrights", &Client::process_get_my_default_administrator_rights_query);
|
methods_.emplace("getmydefaultadministratorrights", &Client::process_get_my_default_administrator_rights_query);
|
||||||
methods_.emplace("setmydefaultadministratorrights", &Client::process_set_my_default_administrator_rights_query);
|
methods_.emplace("setmydefaultadministratorrights", &Client::process_set_my_default_administrator_rights_query);
|
||||||
methods_.emplace("getmyname", &Client::process_get_my_name_query);
|
methods_.emplace("getmyname", &Client::process_get_my_name_query);
|
||||||
|
methods_.emplace("setmyname", &Client::process_set_my_name_query);
|
||||||
methods_.emplace("getmydescription", &Client::process_get_my_description_query);
|
methods_.emplace("getmydescription", &Client::process_get_my_description_query);
|
||||||
methods_.emplace("setmydescription", &Client::process_set_my_description_query);
|
methods_.emplace("setmydescription", &Client::process_set_my_description_query);
|
||||||
methods_.emplace("getmyshortdescription", &Client::process_get_my_short_description_query);
|
methods_.emplace("getmyshortdescription", &Client::process_get_my_short_description_query);
|
||||||
@ -7911,6 +7912,14 @@ td::Status Client::process_get_my_name_query(PromisedQueryPtr &query) {
|
|||||||
return td::Status::OK();
|
return td::Status::OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
td::Status Client::process_set_my_name_query(PromisedQueryPtr &query) {
|
||||||
|
auto language_code = query->arg("language_code");
|
||||||
|
auto name = query->arg("name");
|
||||||
|
send_request(make_object<td_api::setBotName>(my_id_, language_code.str(), name.str()),
|
||||||
|
td::make_unique<TdOnOkQueryCallback>(std::move(query)));
|
||||||
|
return td::Status::OK();
|
||||||
|
}
|
||||||
|
|
||||||
td::Status Client::process_get_my_description_query(PromisedQueryPtr &query) {
|
td::Status Client::process_get_my_description_query(PromisedQueryPtr &query) {
|
||||||
auto language_code = query->arg("language_code");
|
auto language_code = query->arg("language_code");
|
||||||
send_request(make_object<td_api::getBotInfoDescription>(my_id_, language_code.str()),
|
send_request(make_object<td_api::getBotInfoDescription>(my_id_, language_code.str()),
|
||||||
|
@ -512,6 +512,7 @@ class Client final : public WebhookActor::Callback {
|
|||||||
td::Status process_get_my_default_administrator_rights_query(PromisedQueryPtr &query);
|
td::Status process_get_my_default_administrator_rights_query(PromisedQueryPtr &query);
|
||||||
td::Status process_set_my_default_administrator_rights_query(PromisedQueryPtr &query);
|
td::Status process_set_my_default_administrator_rights_query(PromisedQueryPtr &query);
|
||||||
td::Status process_get_my_name_query(PromisedQueryPtr &query);
|
td::Status process_get_my_name_query(PromisedQueryPtr &query);
|
||||||
|
td::Status process_set_my_name_query(PromisedQueryPtr &query);
|
||||||
td::Status process_get_my_description_query(PromisedQueryPtr &query);
|
td::Status process_get_my_description_query(PromisedQueryPtr &query);
|
||||||
td::Status process_set_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_get_my_short_description_query(PromisedQueryPtr &query);
|
||||||
|
Loading…
Reference in New Issue
Block a user