GramIO API Reference / @gramio/contexts/dist / Giveaway
Class: Giveaway
Defined in: contexts/index.d.ts:1752
This object represents a message about a scheduled giveaway.
Constructors
Constructor
new Giveaway(
payload):Giveaway
Defined in: contexts/index.d.ts:1754
Parameters
| Parameter | Type |
|---|---|
payload | TelegramGiveaway |
Returns
Giveaway
Properties
| Property | Type | Defined in |
|---|---|---|
payload | TelegramGiveaway | contexts/index.d.ts:1753 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:1756
Returns
string
chats
Get Signature
get chats():
Chat[]
Defined in: contexts/index.d.ts:1758
The list of chats which the user must join to participate in the giveaway
Returns
Chat[]
countryCodes
Get Signature
get countryCodes():
string[]
Defined in: contexts/index.d.ts:1770
A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways.
Returns
string[]
onlyNewMembers
Get Signature
get onlyNewMembers():
true
Defined in: contexts/index.d.ts:1764
true, if only users who join the chats after the giveaway started should be eligible to win
Returns
true
premiumSubscriptionMonthCount
Get Signature
get premiumSubscriptionMonthCount():
number
Defined in: contexts/index.d.ts:1772
The number of months the Telegram Premium subscription won from the giveaway will be active for
Returns
number
prizeDescription
Get Signature
get prizeDescription():
string
Defined in: contexts/index.d.ts:1768
Description of additional giveaway prize
Returns
string
prizeStarCount
Get Signature
get prizeStarCount():
number
Defined in: contexts/index.d.ts:1774
The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only
Returns
number
winnerCount
Get Signature
get winnerCount():
number
Defined in: contexts/index.d.ts:1762
The number of users which are supposed to be selected as winners of the giveaway
Returns
number
winnersSelectionDate
Get Signature
get winnersSelectionDate():
number
Defined in: contexts/index.d.ts:1760
Point in time (Unix timestamp) when winners of the giveaway will be selected
Returns
number
Methods
hasPublicWinners()
hasPublicWinners():
true
Defined in: contexts/index.d.ts:1766
true, if the list of giveaway winners will be visible to everyone
Returns
true