mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-04 22:34:52 +00:00
pyrofork: Add stars field to class Giveaway
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
02eed79861
commit
76deb77f1c
1 changed files with 8 additions and 2 deletions
|
|
@ -36,9 +36,12 @@ class Giveaway(Object):
|
||||||
quantity (``int``):
|
quantity (``int``):
|
||||||
Quantity of the giveaway prize.
|
Quantity of the giveaway prize.
|
||||||
|
|
||||||
months (``int``):
|
months (``int``, *optional*):
|
||||||
How long the telegram premium last (in month).
|
How long the telegram premium last (in month).
|
||||||
|
|
||||||
|
stars (``int``, *optional*):
|
||||||
|
How many stars the giveaway winner(s) get.
|
||||||
|
|
||||||
expire_date (:py:obj:`~datetime.datetime`):
|
expire_date (:py:obj:`~datetime.datetime`):
|
||||||
Date the giveaway winner(s) will be choosen.
|
Date the giveaway winner(s) will be choosen.
|
||||||
|
|
||||||
|
|
@ -64,9 +67,10 @@ class Giveaway(Object):
|
||||||
client: "pyrogram.Client" = None,
|
client: "pyrogram.Client" = None,
|
||||||
chats: List["types.Chat"],
|
chats: List["types.Chat"],
|
||||||
quantity: int,
|
quantity: int,
|
||||||
months: int,
|
|
||||||
expire_date: datetime,
|
expire_date: datetime,
|
||||||
new_subscribers : bool,
|
new_subscribers : bool,
|
||||||
|
months: int = None,
|
||||||
|
stars: int = None,
|
||||||
additional_price: str = None,
|
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,
|
||||||
|
|
@ -77,6 +81,7 @@ class Giveaway(Object):
|
||||||
self.chats = chats
|
self.chats = chats
|
||||||
self.quantity = quantity
|
self.quantity = quantity
|
||||||
self.months = months
|
self.months = months
|
||||||
|
self.stars = stars
|
||||||
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.additional_price = additional_price
|
||||||
|
|
@ -108,6 +113,7 @@ class Giveaway(Object):
|
||||||
chats=chats,
|
chats=chats,
|
||||||
quantity=giveaway.quantity,
|
quantity=giveaway.quantity,
|
||||||
months=giveaway.months,
|
months=giveaway.months,
|
||||||
|
stars=giveaway.stars,
|
||||||
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,
|
additional_price=giveaway.prize_description,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue