Add td_api::getGreetingStickers.

This commit is contained in:
levlam 2024-04-12 02:57:29 +03:00
parent 9243f51ff9
commit 5143d3fb6f
4 changed files with 15 additions and 0 deletions

View File

@ -9550,6 +9550,9 @@ getAllStickerEmojis sticker_type:StickerType query:string chat_id:int53 return_o
//@limit The maximum number of stickers to be returned; 0-100
searchStickers sticker_type:StickerType emojis:string limit:int32 = Stickers;
//@description Returns greeting stickers from regular sticker sets that can be used for the start page of other users @limit The maximum number of stickers to be returned; 0-100
getGreetingStickers limit:int32 = Stickers;
//@description Returns premium stickers from regular sticker sets @limit The maximum number of stickers to be returned; 0-100
getPremiumStickers limit:int32 = Stickers;

View File

@ -8193,6 +8193,12 @@ void Td::on_request(uint64 id, td_api::searchStickers &request) {
stickers_manager_->search_stickers(sticker_type, std::move(request.emojis_), request.limit_, std::move(promise));
}
void Td::on_request(uint64 id, const td_api::getGreetingStickers &request) {
CHECK_IS_USER();
CREATE_REQUEST_PROMISE();
stickers_manager_->search_stickers(StickerType::Regular, "👋⭐️", 100, std::move(promise));
}
void Td::on_request(uint64 id, const td_api::getPremiumStickers &request) {
CHECK_IS_USER();
CREATE_REQUEST_PROMISE();

View File

@ -1499,6 +1499,8 @@ class Td final : public Actor {
void on_request(uint64 id, td_api::searchStickers &request);
void on_request(uint64 id, const td_api::getGreetingStickers &request);
void on_request(uint64 id, const td_api::getPremiumStickers &request);
void on_request(uint64 id, const td_api::getInstalledStickerSets &request);

View File

@ -3385,6 +3385,10 @@ class CliClient final : public Actor {
SearchQuery query;
get_args(args, query);
send_request(td_api::make_object<td_api::searchStickers>(as_sticker_type(op), query.query, query.limit));
} else if (op == "ggs") {
string limit;
get_args(args, limit);
send_request(td_api::make_object<td_api::getGreetingStickers>(as_limit(limit)));
} else if (op == "gprst") {
string limit;
get_args(args, limit);