class Game
This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
Public Instance Methods
animation()
click to toggle source
Optional
. Animation
that will be displayed in the game message in chats. Upload via BotFather
# File lib/objects/game.rb, line 33 def animation @game.animation end
description()
click to toggle source
Description of the game.
# File lib/objects/game.rb, line 21 def description @game.description end
photo()
click to toggle source
Photo that will be displayed in the game message in chats.
# File lib/objects/game.rb, line 53 def photo poto = @game.photo if poto.empty? return false end ary = [] poto.each do |p| ary << PhotoSize.new(p) end ary end
text()
click to toggle source
Optional.
Brief description of the game or high scores included in the game message.
# File lib/objects/game.rb, line 27 def text @game.text end
text_entities()
click to toggle source
Optional
. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
# File lib/objects/game.rb, line 39 def text_entities t_ent = @game.text_entities if t_ent.empty? return false end ary = [] t_ent.each do |ent| ary << MessageEntity.new(ent) end ary end
title()
click to toggle source
Title of the game.
# File lib/objects/game.rb, line 16 def title @game.title end