PremiumGiveawayParameters class final
Describes parameters of a Telegram Premium giveaway
Constructors
-
PremiumGiveawayParameters({required int boostedChatId, required List<
int> additionalChatIds, required int winnersSelectionDate, required bool onlyNewMembers, required bool hasPublicWinners, required List<String> countryCodes, required String prizeDescription}) -
Describes parameters of a Telegram Premium giveaway
const
-
PremiumGiveawayParameters.fromJson(Map<
String, dynamic> json) -
Parses a PremiumGiveawayParameters from TDLib JSON.
factory
Properties
-
additionalChatIds
→ List<
int> -
Identifiers of other supergroup or 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
final
- boostedChatId → int
-
Identifier of the supergroup or channel chat, which will be automatically boosted by the winners of the giveaway for duration of the Premium subscription. If the chat is a channel, then can_post_messages right is required in the channel, otherwise, the user must be an administrator in the supergroup
final
- clientId → int?
-
Identifier of the TDLib client that sent this object, when known.
no setterinherited
-
countryCodes
→ List<
String> -
The list of two-letter ISO 3166-1 alpha-2 codes of countries, 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. Users with phone number that was bought on Fragment can participate in any giveaway and the country code "FT" must not be specified in the list
final
- extra → dynamic
-
"@extra" of the request this object answers; null for updates.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasPublicWinners → bool
-
True, if the list of winners of the giveaway will be available to everyone
final
- onlyNewMembers → bool
-
True, if only new members of the chats will be eligible for the giveaway
final
- prizeDescription → String
-
Additional description of the giveaway prize; 0-128 characters
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- winnersSelectionDate → int
-
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
final
Methods
-
copyWith(
{int? boostedChatId, List< int> ? additionalChatIds, int? winnersSelectionDate, bool? onlyNewMembers, bool? hasPublicWinners, List<String> ? countryCodes, String? prizeDescription}) → PremiumGiveawayParameters -
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g.
field: () => nullto clear it. -
getConstructor(
) → String -
TDLib type name, e.g.
updateNewMessage.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts this object to TDLib JSON.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- CONSTRUCTOR → const String
- TDLib type name.