mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +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 of the giveaway prize.
|
||||
|
||||
months (``int``):
|
||||
months (``int``, *optional*):
|
||||
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`):
|
||||
Date the giveaway winner(s) will be choosen.
|
||||
|
||||
|
|
@ -64,9 +67,10 @@ class Giveaway(Object):
|
|||
client: "pyrogram.Client" = None,
|
||||
chats: List["types.Chat"],
|
||||
quantity: int,
|
||||
months: int,
|
||||
expire_date: datetime,
|
||||
new_subscribers : bool,
|
||||
months: int = None,
|
||||
stars: int = None,
|
||||
additional_price: str = None,
|
||||
allowed_countries: List[str] = None,
|
||||
private_channel_ids: List[int] = None,
|
||||
|
|
@ -77,6 +81,7 @@ class Giveaway(Object):
|
|||
self.chats = chats
|
||||
self.quantity = quantity
|
||||
self.months = months
|
||||
self.stars = stars
|
||||
self.expire_date = expire_date
|
||||
self.new_subscribers = new_subscribers
|
||||
self.additional_price = additional_price
|
||||
|
|
@ -108,6 +113,7 @@ class Giveaway(Object):
|
|||
chats=chats,
|
||||
quantity=giveaway.quantity,
|
||||
months=giveaway.months,
|
||||
stars=giveaway.stars,
|
||||
expire_date=utils.timestamp_to_datetime(giveaway.until_date),
|
||||
new_subscribers=giveaway.only_new_subscribers,
|
||||
additional_price=giveaway.prize_description,
|
||||
|
|
|
|||
Loading…
Reference in a new issue