You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Entities/Games/Game.php
+8-36Lines changed: 8 additions & 36 deletions
Original file line number
Diff line number
Diff line change
@@ -22,10 +22,12 @@
22
22
*
23
23
* @link https://core.telegram.org/bots/api#game
24
24
*
25
-
* @method string getTitle() Title of the game
26
-
* @method string getDescription() Description of the game
27
-
* @method string getText() 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.
28
-
* @method Animation getAnimation() Optional. Animation that will be displayed in the game message in chats. Upload via BotFather
25
+
* @method string getTitle() Title of the game
26
+
* @method string getDescription() Description of the game
27
+
* @method PhotoSize[] getPhoto() Photo that will be displayed in the game message in chats.
28
+
* @method string getText() 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.
29
+
* @method MessageEntity[] getTextEntities() Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
30
+
* @method Animation getAnimation() Optional. Animation that will be displayed in the game message in chats. Upload via BotFather
29
31
**/
30
32
class Game extends Entity
31
33
{
@@ -35,39 +37,9 @@ class Game extends Entity
35
37
protectedfunctionsubEntities()
36
38
{
37
39
return [
38
-
'photo' => PhotoSize::class,
39
-
'text_entities' => MessageEntity::class,
40
+
'photo' => [PhotoSize::class],
41
+
'text_entities' => [MessageEntity::class],
40
42
'animation' => Animation::class,
41
43
];
42
44
}
43
-
44
-
/**
45
-
* Photo that will be displayed in the game message in chats.
46
-
*
47
-
* This method overrides the default getPhoto method
Copy file name to clipboardExpand all lines: src/Entities/Message.php
+10-91Lines changed: 10 additions & 91 deletions
Original file line number
Diff line number
Diff line change
@@ -34,10 +34,13 @@
34
34
* @method int getEditDate() Optional. Date the message was last edited in Unix time
35
35
* @method string getMediaGroupId() Optional. The unique identifier of a media message group this message belongs to
36
36
* @method string getAuthorSignature() Optional. Signature of the post author for messages in channels
37
+
* @method MessageEntity[] getEntities() Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text
38
+
* @method MessageEntity[] getCaptionEntities() Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
37
39
* @method Audio getAudio() Optional. Message is an audio file, information about the file
38
40
* @method Document getDocument() Optional. Message is a general file, information about the file
39
41
* @method Animation getAnimation() Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set
40
42
* @method Game getGame() Optional. Message is a game, information about the game.
43
+
* @method PhotoSize[] getPhoto() Optional. Message is a photo, available sizes of the photo
41
44
* @method Sticker getSticker() Optional. Message is a sticker, information about the sticker
42
45
* @method Video getVideo() Optional. Message is a video, information about the video
43
46
* @method Voice getVoice() Optional. Message is a voice message, information about the file
@@ -47,8 +50,10 @@
47
50
* @method Location getLocation() Optional. Message is a shared location, information about the location
48
51
* @method Venue getVenue() Optional. Message is a venue, information about the venue
49
52
* @method Poll getPoll() Optional. Message is a native poll, information about the poll
53
+
* @method User[] getNewChatMembers() Optional. A new member(s) was added to the group, information about them (one of this members may be the bot itself)
50
54
* @method User getLeftChatMember() Optional. A member was removed from the group, information about them (this member may be the bot itself)
51
55
* @method string getNewChatTitle() Optional. A chat title was changed to this value
56
+
* @method PhotoSize[] getNewChatPhoto() Optional. A chat photo was changed to this value
52
57
* @method bool getDeleteChatPhoto() Optional. Service message: the chat photo was deleted
53
58
* @method bool getGroupChatCreated() Optional. Service message: the group has been created
54
59
* @method bool getSupergroupChatCreated() Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can’t be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.
@@ -74,13 +79,13 @@ protected function subEntities()
74
79
'forward_from' => User::class,
75
80
'forward_from_chat' => Chat::class,
76
81
'reply_to_message' => ReplyToMessage::class,
77
-
'entities' => MessageEntity::class,
78
-
'caption_entities' => MessageEntity::class,
82
+
'entities' => [MessageEntity::class],
83
+
'caption_entities' => [MessageEntity::class],
79
84
'audio' => Audio::class,
80
85
'document' => Document::class,
81
86
'animation' => Animation::class,
82
87
'game' => Game::class,
83
-
'photo' => PhotoSize::class,
88
+
'photo' => [PhotoSize::class],
84
89
'sticker' => Sticker::class,
85
90
'video' => Video::class,
86
91
'voice' => Voice::class,
@@ -89,102 +94,16 @@ protected function subEntities()
0 commit comments