Add deleteStickerSet.

This commit is contained in:
levlam 2023-02-16 16:27:58 +03:00
parent 64591671fc
commit b38ce2a79d
2 changed files with 9 additions and 0 deletions

View File

@ -298,6 +298,7 @@ bool Client::init_methods() {
methods_.emplace("setstickersetthumb", &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("deletestickerset", &Client::process_delete_sticker_set_query);
methods_.emplace("setstickerpositioninset", &Client::process_set_sticker_position_in_set_query);
methods_.emplace("deletestickerfromset", &Client::process_delete_sticker_from_set_query);
methods_.emplace("setstickeremojilist", &Client::process_set_sticker_emoji_list_query);
@ -9277,6 +9278,13 @@ td::Status Client::process_set_custom_emoji_sticker_set_thumbnail_query(Promised
return Status::OK();
}
td::Status Client::process_delete_sticker_set_query(PromisedQueryPtr &query) {
auto name = query->arg("name");
send_request(make_object<td_api::deleteStickerSet>(name.str()),
td::make_unique<TdOnOkQueryCallback>(std::move(query)));
return Status::OK();
}
td::Status Client::process_set_sticker_position_in_set_query(PromisedQueryPtr &query) {
TRY_RESULT(input_file, get_sticker_input_file(query.get()));
int32 position = get_integer_arg(query.get(), "position", -1);

View File

@ -586,6 +586,7 @@ class Client final : public WebhookActor::Callback {
Status process_set_sticker_set_title_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_delete_sticker_set_query(PromisedQueryPtr &query);
Status process_set_sticker_position_in_set_query(PromisedQueryPtr &query);
Status process_delete_sticker_from_set_query(PromisedQueryPtr &query);
Status process_set_sticker_emoji_list_query(PromisedQueryPtr &query);