mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-08 16:04:51 +00:00
pyrofork: Add additional_price field to class Giveaway
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
4ac0fcc35f
commit
90dc694588
1 changed files with 6 additions and 0 deletions
|
|
@ -45,6 +45,9 @@ class Giveaway(Object):
|
||||||
new_subscribers (``bool``):
|
new_subscribers (``bool``):
|
||||||
True, if the giveaway only for new subscribers.
|
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*):
|
allowed_countries (List of ``str``, *optional*):
|
||||||
List of ISO country codes which eligible to join the giveaway.
|
List of ISO country codes which eligible to join the giveaway.
|
||||||
|
|
||||||
|
|
@ -61,6 +64,7 @@ class Giveaway(Object):
|
||||||
months: int,
|
months: int,
|
||||||
expire_date: datetime,
|
expire_date: datetime,
|
||||||
new_subscribers : bool,
|
new_subscribers : bool,
|
||||||
|
additional_price: str = None,
|
||||||
allowed_countries: List[str] = None,
|
allowed_countries: List[str] = None,
|
||||||
private_channel_ids: List[int] = None
|
private_channel_ids: List[int] = None
|
||||||
):
|
):
|
||||||
|
|
@ -71,6 +75,7 @@ class Giveaway(Object):
|
||||||
self.months = months
|
self.months = months
|
||||||
self.expire_date = expire_date
|
self.expire_date = expire_date
|
||||||
self.new_subscribers = new_subscribers
|
self.new_subscribers = new_subscribers
|
||||||
|
self.additional_price = additional_price
|
||||||
self.allowed_countries = allowed_countries
|
self.allowed_countries = allowed_countries
|
||||||
self.private_channel_ids = private_channel_ids
|
self.private_channel_ids = private_channel_ids
|
||||||
|
|
||||||
|
|
@ -100,6 +105,7 @@ class Giveaway(Object):
|
||||||
months=giveaway.months,
|
months=giveaway.months,
|
||||||
expire_date=utils.timestamp_to_datetime(giveaway.until_date),
|
expire_date=utils.timestamp_to_datetime(giveaway.until_date),
|
||||||
new_subscribers=giveaway.only_new_subscribers,
|
new_subscribers=giveaway.only_new_subscribers,
|
||||||
|
additional_price=giveaway.prize_description,
|
||||||
allowed_countries=giveaway.countries_iso2 if len(giveaway.countries_iso2) > 0 else None,
|
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,
|
private_channel_ids=private_ids if len(private_ids) > 0 else None,
|
||||||
client=client
|
client=client
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue