Improve field name.

This commit is contained in:
levlam 2023-11-06 13:51:49 +03:00
parent 4985931f5c
commit c21c9ec87e
2 changed files with 4 additions and 4 deletions

View File

@ -2340,9 +2340,9 @@ messageExtendedMediaUnsupported caption:formattedText = MessageExtendedMedia;
//@boosted_chat_id Identifier of the channel chat, which will be automatically boosted by the winners of the giveaway for duration of the Premium subscription
//@additional_chat_ids Identifiers of other channel chats that must be subscribed by the users to be eligible for the giveaway. There can be up to getOption("giveaway_additional_chat_count_max") additional chats
//@winners_selection_date Point in time (Unix timestamp) when the giveaway is expected to be performed; must be 60-getOption("giveaway_duration_max") seconds in the future in scheduled giveaways
//@only_new_subscribers True, if only new subscribers of the chats will be eligible for the giveaway
//@only_new_members True, if only new subscribers of the chats will be eligible for the giveaway
//@country_codes The list of two-letter ISO 3166-1 alpha-2 codes of countries, only users from which will be eligible for the giveaway. If empty, then all users can participate in the giveaway. There can be up to getOption("giveaway_country_count_max") chosen countries
premiumGiveawayParameters boosted_chat_id:int53 additional_chat_ids:vector<int53> winners_selection_date:int32 only_new_subscribers:Bool country_codes:vector<string> = PremiumGiveawayParameters;
premiumGiveawayParameters boosted_chat_id:int53 additional_chat_ids:vector<int53> winners_selection_date:int32 only_new_members:Bool country_codes:vector<string> = PremiumGiveawayParameters;
//@description File with the date it was uploaded @file The file @date Point in time (Unix timestamp) when the file was uploaded

View File

@ -63,7 +63,7 @@ Result<GiveawayParameters> GiveawayParameters::get_giveaway_parameters(
td->option_manager_->get_option_integer("giveaway_country_count_max")) {
return Status::Error(400, "Too many countries specified");
}
return GiveawayParameters(boosted_channel_id, std::move(additional_channel_ids), parameters->only_new_subscribers_,
return GiveawayParameters(boosted_channel_id, std::move(additional_channel_ids), parameters->only_new_members_,
parameters->winners_selection_date_, vector<string>(parameters->country_codes_));
}
@ -142,7 +142,7 @@ bool operator!=(const GiveawayParameters &lhs, const GiveawayParameters &rhs) {
StringBuilder &operator<<(StringBuilder &string_builder, const GiveawayParameters &giveaway_parameters) {
return string_builder << "Giveaway[" << giveaway_parameters.boosted_channel_id_ << " + "
<< giveaway_parameters.additional_channel_ids_
<< (giveaway_parameters.only_new_subscribers_ ? " only for new subscribes" : "")
<< (giveaway_parameters.only_new_subscribers_ ? " only for new members" : "")
<< " for countries " << giveaway_parameters.country_codes_ << " at "
<< giveaway_parameters.date_ << ']';
}