@@ -37,6 +37,7 @@ type Update struct {
3737 CallbackQuery * CallbackQuery `json:"callback_query"`
3838 ShippingQuery * ShippingQuery `json:"shipping_query"`
3939 PreCheckoutQuery * PreCheckoutQuery `json:"pre_checkout_query"`
40+ Poll * Poll `json:"poll"`
4041}
4142
4243// UpdatesChannel is the channel for getting updates.
@@ -141,6 +142,7 @@ type Message struct {
141142 ForwardFromChat * Chat `json:"forward_from_chat"` // optional
142143 ForwardFromMessageID int `json:"forward_from_message_id"` // optional
143144 ForwardSignature string `json:"forward_signature"` // optional
145+ ForwardSenderName string `json:"forward_sender_name"` // optional
144146 ForwardDate int `json:"forward_date"` // optional
145147 ReplyToMessage * Message `json:"reply_to_message"` // optional
146148 EditDate int `json:"edit_date"` // optional
@@ -162,6 +164,7 @@ type Message struct {
162164 Contact * Contact `json:"contact"` // optional
163165 Location * Location `json:"location"` // optional
164166 Venue * Venue `json:"venue"` // optional
167+ Poll * Poll `json:"poll"` // optional
165168 NewChatMembers []User `json:"new_chat_members"` // optional
166169 LeftChatMember * User `json:"left_chat_member"` // optional
167170 NewChatTitle string `json:"new_chat_title"` // optional
@@ -385,6 +388,20 @@ type Venue struct {
385388 FoursquareID string `json:"foursquare_id"` // optional
386389}
387390
391+ // PollOption contains information about one answer option in a poll.
392+ type PollOption struct {
393+ Text string `json:"text"`
394+ VoterCount int `json:"voter_count"`
395+ }
396+
397+ // Poll contains information about a poll.
398+ type Poll struct {
399+ ID string `json:"id"`
400+ Question string `json:"question"`
401+ Options []PollOption `json:"options"`
402+ IsClosed bool `json:"is_closed"`
403+ }
404+
388405// UserProfilePhotos contains a set of user profile photos.
389406type UserProfilePhotos struct {
390407 TotalCount int `json:"total_count"`
@@ -487,6 +504,7 @@ type ChatMember struct {
487504 CanRestrictMembers bool `json:"can_restrict_members,omitempty"` // optional
488505 CanPinMessages bool `json:"can_pin_messages,omitempty"` // optional
489506 CanPromoteMembers bool `json:"can_promote_members,omitempty"` // optional
507+ IsChatMember bool `json:"is_member"` // optional
490508 CanSendMessages bool `json:"can_send_messages,omitempty"` // optional
491509 CanSendMediaMessages bool `json:"can_send_media_messages,omitempty"` // optional
492510 CanSendOtherMessages bool `json:"can_send_other_messages,omitempty"` // optional
0 commit comments