telegramsjs
    Preparing search index...

    Class GiveawayWinners

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    addChatCount?: number

    The number of other chats the user had to join in order to be eligible for the giveaway

    chat: Chat

    The chat that created the giveaway

    count: number

    Total number of winners in the giveaway

    description?: string

    Description of additional giveaway prize

    messageId: string

    Identifier of the messsage with the giveaway in the chat

    onlyNewMembers?: boolean

    True, if only users who had joined the chats after the giveaway started were eligible to win

    refunded?: true

    True, if the giveaway was canceled because the payment for it was refunded

    selectionUnixTime: number

    Point in time (Unix timestamp) when winners of the giveaway were selected

    starCount?: number

    The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only

    subscriptionMonthCount?: number

    The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only

    unclaimedPrizeCount?: number

    Number of undistributed prizes

    winners: Collection<string, User>

    List of up to 100 winners of the giveaway

    Accessors

    • get selectionAt(): Date

      Point in time when winners of the giveaway were selected

      Returns Date

    • get selectionTimestamp(): number

      Return the timestamp winners of the giveaway were selected, in milliseconds

      Returns number

    Methods

    • Protected

      Creates a clone of the current instance

      Returns Base

      A clone of the current instance

    • Parameters

      • data: GiveawayWinners

        Data about the represents a message about the completion of a giveaway with public winners

      Returns GiveawayWinners

    • Protected

      Updates the current instance with new data and returns a clone of the updated instance

      Parameters

      • data: Record<string, any>

        The data to update the instance with

      Returns Base

      A clone of the updated instance

    • Makes the class iterable, returning each User object.

      Returns IterableIterator<User>

    • Checks if this giveaway winners object is equal to another giveaway winners object.

      Parameters

      Returns boolean

      True if both objects are instances of GiveawayWinners and are equal based on key properties, otherwise false.

    • Flatten an object. Any properties that are collections will get converted to an array of keys.

      Parameters

      • OptionalpropsRecursive: boolean

        Optional. If true, calls toJSON method on nested objects.

      • ...props: Record<string, string | boolean>[]

        Optional. Specific properties to include/exclude, or rename.

      Returns Record<string, any>

      Flattened object.

    • Returns the id instance Chat, User, ChatMember and other

      Returns string | null