class
Hamilton::Types::Gift
- Hamilton::Types::Gift
- Reference
- Object
Overview
This object represents a gift that can be sent by the bot.
Included Modules
- Hamilton::Types::Common
- JSON::Serializable
Defined in:
types/gift.crConstructors
- .new(pull : JSON::PullParser)
- .new(params)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
- .new(**params)
Instance Method Summary
-
#background : Hamilton::Types::GiftBackground | Nil
Background of the gift.
-
#background=(background : Hamilton::Types::GiftBackground | Nil)
Background of the gift.
-
#has_colors : Bool | Nil
True, if the gift can be used (after being upgraded) to customize a user's appearance.
-
#has_colors=(has_colors : Bool | Nil)
True, if the gift can be used (after being upgraded) to customize a user's appearance.
-
#id : String
Unique identifier of the gift.
-
#id=(id : String)
Unique identifier of the gift.
-
#is_premium : Bool | Nil
True, if the gift can only be purchased by Telegram Premium subscribers.
-
#is_premium=(is_premium : Bool | Nil)
True, if the gift can only be purchased by Telegram Premium subscribers.
-
#non_nil_fields : Array(String)
List of available non-nil fields.
-
#non_nil_fields=(non_nil_fields : Array(String))
List of available non-nil fields.
-
#personal_remaining_count : Int32 | Nil
The number of remaining gifts of this type that can be sent by the bot; for limited gifts only.
-
#personal_remaining_count=(personal_remaining_count : Int32 | Nil)
The number of remaining gifts of this type that can be sent by the bot; for limited gifts only.
-
#personal_total_count : Int32 | Nil
The total number of gifts of this type that can be sent by the bot; for limited gifts only.
-
#personal_total_count=(personal_total_count : Int32 | Nil)
The total number of gifts of this type that can be sent by the bot; for limited gifts only.
-
#publisher_chat : Hamilton::Types::Chat | Nil
Information about the chat that published the gift.
-
#publisher_chat=(publisher_chat : Hamilton::Types::Chat | Nil)
Information about the chat that published the gift.
-
#remaining_count : Int32 | Nil
The number of remaining gifts of this type that can be sent; for limited gifts only.
-
#remaining_count=(remaining_count : Int32 | Nil)
The number of remaining gifts of this type that can be sent; for limited gifts only.
-
#star_count : Int32
The number of Telegram Stars that must be paid to send the sticker.
-
#star_count=(star_count : Int32)
The number of Telegram Stars that must be paid to send the sticker.
-
#sticker : Hamilton::Types::Sticker
The sticker that represents the gift.
-
#sticker=(sticker : Hamilton::Types::Sticker)
The sticker that represents the gift.
-
#total_count : Int32 | Nil
The total number of the gifts of this type that can be sent; for limited gifts only.
-
#total_count=(total_count : Int32 | Nil)
The total number of the gifts of this type that can be sent; for limited gifts only.
-
#unique_gift_variant_count : Int32 | Nil
The total number of different unique gifts that can be obtained by upgrading the gift.
-
#unique_gift_variant_count=(unique_gift_variant_count : Int32 | Nil)
The total number of different unique gifts that can be obtained by upgrading the gift.
-
#upgrade_star_count : Int32 | Nil
The number of Telegram Stars that must be paid to upgrade the gift to a unique one.
-
#upgrade_star_count=(upgrade_star_count : Int32 | Nil)
The number of Telegram Stars that must be paid to upgrade the gift to a unique one.
Instance methods inherited from class Reference
==(other : Hamilton::Any)
==
Instance methods inherited from class Object
===(other : Hamilton::Any)
===
Constructor Detail
Instance Method Detail
True, if the gift can be used (after being upgraded) to customize a user's appearance.
True, if the gift can be used (after being upgraded) to customize a user's appearance.
The number of remaining gifts of this type that can be sent by the bot; for limited gifts only.
The number of remaining gifts of this type that can be sent by the bot; for limited gifts only.
The total number of gifts of this type that can be sent by the bot; for limited gifts only.
The total number of gifts of this type that can be sent by the bot; for limited gifts only.
Information about the chat that published the gift.
Information about the chat that published the gift.
The number of remaining gifts of this type that can be sent; for limited gifts only.
The number of remaining gifts of this type that can be sent; for limited gifts only.
The number of Telegram Stars that must be paid to send the sticker.
The total number of the gifts of this type that can be sent; for limited gifts only.
The total number of the gifts of this type that can be sent; for limited gifts only.
The total number of different unique gifts that can be obtained by upgrading the gift.
The total number of different unique gifts that can be obtained by upgrading the gift.
The number of Telegram Stars that must be paid to upgrade the gift to a unique one.
The number of Telegram Stars that must be paid to upgrade the gift to a unique one.