Skip to content

Commit

Permalink
Added web_app_data for a message
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Borovikov committed Apr 17, 2022
1 parent e22b5f4 commit c4abfac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions media.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,12 @@ type Venue struct {
GooglePlaceType string `json:"google_place_type,omitempty"`
}

// WebAppData object represents a data sent from a Web App to the bot
type WebAppData struct {
Data string `json:"data"`
ButtonText string `json:"button_text"`
}

// Dice object represents a dice with a random value
// from 1 to 6 for currently supported base emoji.
type Dice struct {
Expand Down
3 changes: 3 additions & 0 deletions message.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ type Message struct {
// For a service message, a voice chat schedule in the chat.
VoiceChatScheduled *VoiceChatScheduled `json:"voice_chat_scheduled,omitempty"`

// For a data sent by a Web App
WebAppData *WebAppData `json:"web_app_data,omitempty"`

// For a service message, represents the content of a service message,
// sent whenever a user in the chat triggers a proximity alert set by another user.
ProximityAlert *ProximityAlert `json:"proximity_alert_triggered,omitempty"`
Expand Down

0 comments on commit c4abfac

Please sign in to comment.