mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-12-28 21:25:49 +01:00
Add "has_public_winners" and "prize_description" giveaway fields.
This commit is contained in:
parent
7575257ca6
commit
9aedc15f76
@ -2083,10 +2083,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