haskell-tdlib-2.1.1.0: Binding to the Telegram Database Library
Safe HaskellSafe-Inferred
LanguageGHC2021

TD.Data.Gift

Documentation

data Gift Source #

Constructors

Gift

Describes a gift that can be sent to another user or channel chat

Fields

  • _id :: Maybe Int

    Unique identifier of the gift

  • publisher_chat_id :: Maybe Int

    Identifier of the chat that published the gift; 0 if none

  • sticker :: Maybe Sticker

    The sticker representing the gift

  • star_count :: Maybe Int

    Number of Telegram Stars that must be paid for the gift

  • default_sell_star_count :: Maybe Int

    Number of Telegram Stars that can be claimed by the receiver instead of the regular gift by default. If the gift was paid with just bought Telegram Stars, then full value can be claimed

  • upgrade_star_count :: Maybe Int

    Number of Telegram Stars that must be paid to upgrade the gift; 0 if upgrade isn't possible

  • has_colors :: Maybe Bool

    True, if the gift can be used to customize the user's name, and backgrounds of profile photo, reply header, and link preview

  • is_for_birthday :: Maybe Bool

    True, if the gift is a birthday gift

  • is_premium :: Maybe Bool

    True, if the gift can be bought only by Telegram Premium subscribers

  • next_send_date :: Maybe Int

    Point in time (Unix timestamp) when the gift can be sent next time by the current user; can be 0 or a date in the past. If the date is in the future, then call canSendGift to get the reason, why the gift can't be sent now

  • user_limits :: Maybe GiftPurchaseLimits

    Number of times the gift can be purchased by the current user; may be null if not limited

  • overall_limits :: Maybe GiftPurchaseLimits

    Number of times the gift can be purchased all users; may be null if not limited

  • first_send_date :: Maybe Int

    Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only

  • last_send_date :: Maybe Int

    Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only

Instances

Instances details
FromJSON Gift Source # 
Instance details

Defined in TD.Data.Gift

Show Gift Source # 
Instance details

Defined in TD.Data.Gift

Methods

showsPrec :: Int -> Gift -> ShowS #

show :: Gift -> String #

showList :: [Gift] -> ShowS #

Eq Gift Source # 
Instance details

Defined in TD.Data.Gift

Methods

(==) :: Gift -> Gift -> Bool #

(/=) :: Gift -> Gift -> Bool #

ShortShow Gift Source # 
Instance details

Defined in TD.Data.Gift