Add setStickerSetTitle.

This commit is contained in:
levlam 2023-02-14 17:30:50 +03:00
parent 0c7a7236eb
commit 401894a53b
2 changed files with 10 additions and 0 deletions

View File

@ -294,6 +294,7 @@ bool Client::init_methods() {
methods_.emplace("uploadstickerfile", &Client::process_upload_sticker_file_query); methods_.emplace("uploadstickerfile", &Client::process_upload_sticker_file_query);
methods_.emplace("createnewstickerset", &Client::process_create_new_sticker_set_query); methods_.emplace("createnewstickerset", &Client::process_create_new_sticker_set_query);
methods_.emplace("addstickertoset", &Client::process_add_sticker_to_set_query); methods_.emplace("addstickertoset", &Client::process_add_sticker_to_set_query);
methods_.emplace("setstickersettitle", &Client::process_set_sticker_set_title_query);
methods_.emplace("setstickersetthumb", &Client::process_set_sticker_set_thumbnail_query); methods_.emplace("setstickersetthumb", &Client::process_set_sticker_set_thumbnail_query);
methods_.emplace("setstickersetthumbnail", &Client::process_set_sticker_set_thumbnail_query); methods_.emplace("setstickersetthumbnail", &Client::process_set_sticker_set_thumbnail_query);
methods_.emplace("setcustomemojistickersetthumbnail", &Client::process_set_custom_emoji_sticker_set_thumbnail_query); methods_.emplace("setcustomemojistickersetthumbnail", &Client::process_set_custom_emoji_sticker_set_thumbnail_query);
@ -9215,6 +9216,14 @@ td::Status Client::process_add_sticker_to_set_query(PromisedQueryPtr &query) {
return Status::OK(); return Status::OK();
} }
td::Status Client::process_set_sticker_set_title_query(PromisedQueryPtr &query) {
auto name = query->arg("name");
auto title = query->arg("title");
send_request(make_object<td_api::setStickerSetTitle>(name.str(), title.str()),
td::make_unique<TdOnOkQueryCallback>(std::move(query)));
return Status::OK();
}
td::Status Client::process_set_sticker_set_thumbnail_query(PromisedQueryPtr &query) { td::Status Client::process_set_sticker_set_thumbnail_query(PromisedQueryPtr &query) {
TRY_RESULT(user_id, get_user_id(query.get())); TRY_RESULT(user_id, get_user_id(query.get()));
auto name = query->arg("name"); auto name = query->arg("name");

View File

@ -579,6 +579,7 @@ class Client final : public WebhookActor::Callback {
Status process_upload_sticker_file_query(PromisedQueryPtr &query); Status process_upload_sticker_file_query(PromisedQueryPtr &query);
Status process_create_new_sticker_set_query(PromisedQueryPtr &query); Status process_create_new_sticker_set_query(PromisedQueryPtr &query);
Status process_add_sticker_to_set_query(PromisedQueryPtr &query); Status process_add_sticker_to_set_query(PromisedQueryPtr &query);
Status process_set_sticker_set_title_query(PromisedQueryPtr &query);
Status process_set_sticker_set_thumbnail_query(PromisedQueryPtr &query); Status process_set_sticker_set_thumbnail_query(PromisedQueryPtr &query);
Status process_set_custom_emoji_sticker_set_thumbnail_query(PromisedQueryPtr &query); Status process_set_custom_emoji_sticker_set_thumbnail_query(PromisedQueryPtr &query);
Status process_set_sticker_position_in_set_query(PromisedQueryPtr &query); Status process_set_sticker_position_in_set_query(PromisedQueryPtr &query);