class Hamilton::Types::Giveaway

Overview

This object represents a message about a scheduled giveaway.

Included Modules

Defined in:

types/giveaway.cr

Constructors

Instance Method Summary

Instance methods inherited from class Reference

==(other : Hamilton::Any) ==

Instance methods inherited from class Object

===(other : Hamilton::Any) ===

Constructor Detail

def self.new(pull : JSON::PullParser) #

def self.new(params) #

def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

def self.new(**params) #

Instance Method Detail

def chats : Array(Hamilton::Types::Chat) #

The list of chats which the user must join to participate in the giveaway.


def chats=(chats : Array(Hamilton::Types::Chat)) #

The list of chats which the user must join to participate in the giveaway.


def country_codes : Array(String) | Nil #

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.


def country_codes=(country_codes : Array(String) | Nil) #

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.


def has_public_winners : Bool | Nil #

True, if the list of giveaway winners will be visible to everyone.


def has_public_winners=(has_public_winners : Bool | Nil) #

True, if the list of giveaway winners will be visible to everyone.


def non_nil_fields : Array(String) #

List of available non-nil fields.


def non_nil_fields=(non_nil_fields : Array(String)) #

List of available non-nil fields.


def only_new_members : Bool | Nil #

True, if only users who join the chats after the giveaway started should be eligible to win.


def only_new_members=(only_new_members : Bool | Nil) #

True, if only users who join the chats after the giveaway started should be eligible to win.


def premium_subscription_month_count : Int32 | Nil #

The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only.


def premium_subscription_month_count=(premium_subscription_month_count : Int32 | Nil) #

The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only.


def prize_description : String | Nil #

Description of additional giveaway prize.


def prize_description=(prize_description : String | Nil) #

Description of additional giveaway prize.


def prize_star_count : Int32 | Nil #

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


def prize_star_count=(prize_star_count : Int32 | Nil) #

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


def winner_count : Int32 #

The number of users which are supposed to be selected as winners of the giveaway.


def winner_count=(winner_count : Int32) #

The number of users which are supposed to be selected as winners of the giveaway.


def winners_selection_date : Int32 #

Point in time (Unix timestamp) when winners of the giveaway will be selected.


def winners_selection_date=(winners_selection_date : Int32) #

Point in time (Unix timestamp) when winners of the giveaway will be selected.