Giveaway Class
extends BaseRepresents a message about a scheduled giveaway
Properties
chats:
client: Client
countryCodes:
hasPublicWinners: boolean
onlyNewMembers: boolean
premiumSubscriptionMonthCount: number
prizeDescription: string
winnerCount: number
winnersSelectionDate: Date
Methods
{ "id": 1326, "name": "Giveaway", "variant": "declaration", "kind": 128, "flags": {}, "comment": { "summary": [ { "kind": "text", "text": "Represents a message about a scheduled giveaway" } ] }, "children": [ { "id": 1327, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { "fileName": "packages/tgkit/src/structures/Giveaway.ts", "line": 36, "character": 1 } ], "signatures": [ { "id": 1328, "name": "new Giveaway", "variant": "signature", "kind": 16384, "flags": {}, "sources": [ { "fileName": "packages/tgkit/src/structures/Giveaway.ts", "line": 36, "character": 1 } ], "parameters": [ { "id": 1329, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", "target": 1, "name": "Client", "package": "tgkit", "qualifiedName": "default" } }, { "id": 1330, "name": "data", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "intrinsic", "name": "any" } } ], "type": { "type": "reference", "target": 1326, "name": "Giveaway", "package": "tgkit", "qualifiedName": "default" }, "overwrites": { "type": "reference", "target": -1, "name": "Base.constructor" } } ], "overwrites": { "type": "reference", "target": -1, "name": "Base.constructor" } }, { "id": 1331, "name": "chats", "variant": "declaration", "kind": 1024, "flags": {}, "comment": { "summary": [ { "kind": "text", "text": "The list of chats which the user must join to participate in the giveaway" } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/Giveaway.ts", "line": 8, "character": 1 } ], "type": { "type": "array", "elementType": { "type": "reference", "target": 689, "name": "Chat", "package": "tgkit", "qualifiedName": "default" } } }, { "id": 1339, "name": "client", "variant": "declaration", "kind": 1024, "flags": { "isInherited": true }, "sources": [ { "fileName": "packages/tgkit/src/structures/Base.ts", "line": 4, "character": 1 } ], "type": { "type": "reference", "target": 1, "name": "Client", "package": "tgkit", "qualifiedName": "default" }, "inheritedFrom": { "type": "reference", "target": -1, "name": "Base.client" } }, { "id": 1337, "name": "countryCodes", "variant": "declaration", "kind": 1024, "flags": { "isOptional": true }, "comment": { "summary": [ { "kind": "text", "text": "A list of two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes\nindicating the countries from which eligible users for the giveaway must come.\nIf empty, then all users can participate in the giveaway.\nUsers with a phone number that was bought on Fragment can always participate in giveaways." } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/Giveaway.ts", "line": 31, "character": 1 } ], "type": { "type": "array", "elementType": { "type": "intrinsic", "name": "string" } } }, { "id": 1335, "name": "hasPublicWinners", "variant": "declaration", "kind": 1024, "flags": { "isOptional": true }, "comment": { "summary": [ { "kind": "text", "text": "*true*, if the list of giveaway winners will be visible to everyone" } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/Giveaway.ts", "line": 20, "character": 1 } ], "type": { "type": "intrinsic", "name": "boolean" } }, { "id": 1334, "name": "onlyNewMembers", "variant": "declaration", "kind": 1024, "flags": { "isOptional": true }, "comment": { "summary": [ { "kind": "text", "text": "*true*, if only users who join the chats after the giveaway started should be eligible to win" } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/Giveaway.ts", "line": 17, "character": 1 } ], "type": { "type": "intrinsic", "name": "boolean" } }, { "id": 1338, "name": "premiumSubscriptionMonthCount", "variant": "declaration", "kind": 1024, "flags": { "isOptional": true }, "comment": { "summary": [ { "kind": "text", "text": "The number of months the Telegram Premium subscription won from the giveaway will be active for" } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/Giveaway.ts", "line": 34, "character": 1 } ], "type": { "type": "intrinsic", "name": "number" } }, { "id": 1336, "name": "prizeDescription", "variant": "declaration", "kind": 1024, "flags": { "isOptional": true }, "comment": { "summary": [ { "kind": "text", "text": "Description of additional giveaway prize" } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/Giveaway.ts", "line": 23, "character": 1 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 1333, "name": "winnerCount", "variant": "declaration", "kind": 1024, "flags": {}, "comment": { "summary": [ { "kind": "text", "text": "The number of users which are supposed to be selected as winners of the giveaway" } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/Giveaway.ts", "line": 14, "character": 1 } ], "type": { "type": "intrinsic", "name": "number" } }, { "id": 1332, "name": "winnersSelectionDate", "variant": "declaration", "kind": 1024, "flags": {}, "comment": { "summary": [ { "kind": "text", "text": "Point in time when winners of the giveaway will be selected" } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/Giveaway.ts", "line": 11, "character": 1 } ], "type": { "type": "reference", "target": { "sourceFileName": "node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es5.d.ts", "qualifiedName": "Date" }, "name": "Date", "package": "typescript" } } ], "groups": [ { "title": "Constructors", "children": [ 1327 ] }, { "title": "Properties", "children": [ 1331, 1339, 1337, 1335, 1334, 1338, 1336, 1333, 1332 ] } ], "sources": [ { "fileName": "packages/tgkit/src/structures/Giveaway.ts", "line": 6, "character": 21 } ], "extendedTypes": [ { "type": "reference", "target": { "sourceFileName": "packages/tgkit/src/structures/Base.ts", "qualifiedName": "default" }, "name": "default", "package": "tgkit" } ] }