mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-12-26 12:45:52 +01:00
Add "has_public_winners" and "prize_description" giveaway fields.
This commit is contained in:
parent
fd87df5fed
commit
1f512433ef
@ -1981,10 +1981,16 @@ class Client::JsonGiveaway final : public td::Jsonable {
|
||||
if (giveaway_->parameters_->only_new_members_) {
|
||||
object("only_new_members", td::JsonTrue());
|
||||
}
|
||||
if (giveaway_->parameters_->has_public_winners_) {
|
||||
object("has_public_winners", td::JsonTrue());
|
||||
}
|
||||
if (!giveaway_->parameters_->country_codes_.empty()) {
|
||||
object("country_codes", td::json_array(giveaway_->parameters_->country_codes_,
|
||||
[](td::Slice country_code) { return td::JsonString(country_code); }));
|
||||
}
|
||||
if (!giveaway_->parameters_->prize_description_.empty()) {
|
||||
object("prize_description", giveaway_->parameters_->prize_description_);
|
||||
}
|
||||
if (giveaway_->month_count_ > 0) {
|
||||
object("premium_subscription_month_count", giveaway_->month_count_);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user