Skip to content

Commit

Permalink
Add inline venue type
Browse files Browse the repository at this point in the history
  • Loading branch information
victpork committed Jan 6, 2020
1 parent b33efee commit 1f98cd2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
14 changes: 13 additions & 1 deletion helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,18 @@ func NewInlineQueryResultLocation(id, title string, latitude, longitude float64)
}
}

// NewInlineQueryResultVenue creates a new inline query venue.
func NewInlineQueryResultVenue(id, title, address string, latitude, longitude float64) InlineQueryResultVenue {
return InlineQueryResultVenue{
Type: "venue",
ID: id,
Title: title,
Address: address,
Latitude: latitude,
Longitude: longitude,
}
}

// NewEditMessageText allows you to edit the text of a message.
func NewEditMessageText(chatID int64, messageID int, text string) EditMessageTextConfig {
return EditMessageTextConfig{
Expand All @@ -622,7 +634,7 @@ func NewEditMessageCaption(chatID int64, messageID int, caption string) EditMess
ChatID: chatID,
MessageID: messageID,
},
Caption: caption,
Caption: caption,
}
}

Expand Down
17 changes: 17 additions & 0 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,23 @@ type InlineQueryResultLocation struct {
ThumbHeight int `json:"thumb_height"`
}

// InlineQueryResultVenue is an inline query response venue.
type InlineQueryResultVenue struct {
Type string `json:"type"` // required
ID string `json:"id"` // required
Latitude float64 `json:"latitude"` // required
Longitude float64 `json:"longitude"` // required
Title string `json:"title"` // required
Address string `json:"address"` // required
FoursquareID string `json:"foursquare_id"`
FoursquareType string `json:"foursquare_type"`
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
InputMessageContent interface{} `json:"input_message_content,omitempty"`
ThumbURL string `json:"thumb_url"`
ThumbWidth int `json:"thumb_width"`
ThumbHeight int `json:"thumb_height"`
}

// InlineQueryResultGame is an inline query response game.
type InlineQueryResultGame struct {
Type string `json:"type"`
Expand Down

0 comments on commit 1f98cd2

Please sign in to comment.