Class Game
This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
Inheritance
System.Object
Game
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: TelegramBotApi.Types.Game
Assembly: TelegramBotApi.dll
Syntax
[JsonObject(MemberSerialization = MemberSerialization.OptIn, ItemNullValueHandling = NullValueHandling.Ignore)]
public class Game
Properties
| Improve this Doc View SourceAnimation
Optional. Animation that will be displayed in the game message in chats. Upload via BotFather
Declaration
[JsonProperty(PropertyName = "animation")]
public Animation Animation { get; set; }
Property Value
Type | Description |
---|---|
Animation |
Description
Description of the game
Declaration
[JsonProperty(PropertyName = "description", Required = Required.Always)]
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Photo
Photo that will be displayed in the game message in chats.
Declaration
[JsonProperty(PropertyName = "photo", Required = Required.Always)]
public PhotoSize[] Photo { get; set; }
Property Value
Type | Description |
---|---|
PhotoSize[] |
Text
Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters.
Declaration
[JsonProperty(PropertyName = "text")]
public string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String |
TextEntities
Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
Declaration
[JsonProperty(PropertyName = "text_entities")]
public MessageEntity[] TextEntities { get; set; }
Property Value
Type | Description |
---|---|
MessageEntity[] |
Title
Title of the game
Declaration
[JsonProperty(PropertyName = "title", Required = Required.Always)]
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String |