Class: TD::Types::PremiumGiveawayParameters

Inherits:
Base
  • Object
show all
Defined in:
lib/tdlib/types/premium_giveaway_parameters.rb

Overview

Describes parameters of a Telegram Premium giveaway.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#additional_chat_idsArray<Integer>

Identifiers of other supergroup or channel chats that must be subscribed by the users to be eligible for the giveaway. There can be up to getOption(“giveaway_additional_chat_count_max”) additional chats.

Returns:

  • (Array<Integer>)

    the current value of additional_chat_ids



22
23
24
# File 'lib/tdlib/types/premium_giveaway_parameters.rb', line 22

def additional_chat_ids
  @additional_chat_ids
end

#boosted_chat_idInteger

Identifier of the supergroup or channel chat, which will be automatically boosted by the winners of the giveaway for duration of the Premium subscription. If the chat is a channel, then can_post_messages right is required in the channel, otherwise, the user must be an administrator in the supergroup.

Returns:

  • (Integer)

    the current value of boosted_chat_id



22
23
24
# File 'lib/tdlib/types/premium_giveaway_parameters.rb', line 22

def boosted_chat_id
  @boosted_chat_id
end

#country_codesArray<TD::Types::String>?

The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be eligible for the giveaway. If empty, then all users can participate in the giveaway. There can be up to getOption(“giveaway_country_count_max”) chosen countries. Users with phone number that was bought at fragment.com can participate in any giveaway and the country code “FT” must not be specified in the list.

Returns:

  • (Array<TD::Types::String>, nil)

    the current value of country_codes



22
23
24
# File 'lib/tdlib/types/premium_giveaway_parameters.rb', line 22

def country_codes
  @country_codes
end

#has_public_winnersBoolean

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

Returns:

  • (Boolean)

    the current value of has_public_winners



22
23
24
# File 'lib/tdlib/types/premium_giveaway_parameters.rb', line 22

def has_public_winners
  @has_public_winners
end

#only_new_membersBoolean

True, if only new members of the chats will be eligible for the giveaway.

Returns:

  • (Boolean)

    the current value of only_new_members



22
23
24
# File 'lib/tdlib/types/premium_giveaway_parameters.rb', line 22

def only_new_members
  @only_new_members
end

#prize_descriptionTD::Types::String

Additional description of the giveaway prize; 0-128 characters.

Returns:

  • (TD::Types::String)

    the current value of prize_description



22
23
24
# File 'lib/tdlib/types/premium_giveaway_parameters.rb', line 22

def prize_description
  @prize_description
end

#winners_selection_dateInteger

Point in time (Unix timestamp) when the giveaway is expected to be performed; must be 60-getOption(“giveaway_duration_max”) seconds in the future in scheduled giveaways.

Returns:

  • (Integer)

    the current value of winners_selection_date



22
23
24
# File 'lib/tdlib/types/premium_giveaway_parameters.rb', line 22

def winners_selection_date
  @winners_selection_date
end