From 90dc69458837600855bcbd3a5ac421f33ba77a47 Mon Sep 17 00:00:00 2001 From: wulan17 Date: Wed, 14 Aug 2024 23:54:35 +0700 Subject: [PATCH] pyrofork: Add additional_price field to class Giveaway Signed-off-by: wulan17 --- pyrogram/types/messages_and_media/giveaway.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyrogram/types/messages_and_media/giveaway.py b/pyrogram/types/messages_and_media/giveaway.py index 217da0b1..46c9cc95 100644 --- a/pyrogram/types/messages_and_media/giveaway.py +++ b/pyrogram/types/messages_and_media/giveaway.py @@ -45,6 +45,9 @@ class Giveaway(Object): new_subscribers (``bool``): True, if the giveaway only for new subscribers. + additional_price (``str``, *optional*): + Additional prize for the giveaway winner(s). + allowed_countries (List of ``str``, *optional*): List of ISO country codes which eligible to join the giveaway. @@ -61,6 +64,7 @@ class Giveaway(Object): months: int, expire_date: datetime, new_subscribers : bool, + additional_price: str = None, allowed_countries: List[str] = None, private_channel_ids: List[int] = None ): @@ -71,6 +75,7 @@ class Giveaway(Object): self.months = months self.expire_date = expire_date self.new_subscribers = new_subscribers + self.additional_price = additional_price self.allowed_countries = allowed_countries self.private_channel_ids = private_channel_ids @@ -100,6 +105,7 @@ class Giveaway(Object): months=giveaway.months, expire_date=utils.timestamp_to_datetime(giveaway.until_date), new_subscribers=giveaway.only_new_subscribers, + additional_price=giveaway.prize_description, allowed_countries=giveaway.countries_iso2 if len(giveaway.countries_iso2) > 0 else None, private_channel_ids=private_ids if len(private_ids) > 0 else None, client=client