diff --git a/bot.go b/bot.go index 68a24c1..876274f 100644 --- a/bot.go +++ b/bot.go @@ -122,6 +122,8 @@ type Bot interface { SendAnimation(msg entity.MessageEnvelop) (entity.Message, error) // SendDice is used to send an animated emoji that will display a random value. SendDice(msg entity.MessageEnvelop) (entity.Message, error) + // SendVenue is used to send information about a venue. + SendVenue(msg entity.MessageEnvelop) (entity.Message, error) } // BotOptions hold the options for the bot diff --git a/default.go b/default.go index 567f71d..5057a70 100644 --- a/default.go +++ b/default.go @@ -219,3 +219,11 @@ func (b *bot) SendDice(msg entity.MessageEnvelop) (entity.Message, error) { return res, err } + +func (b *bot) SendVenue(msg entity.MessageEnvelop) (entity.Message, error) { + var res entity.Message + + err := b.SendMessageAny(MessageVenue, msg, &res) + + return res, err +} diff --git a/entity/message_envelop.go b/entity/message_envelop.go index c895e8b..d436c9c 100644 --- a/entity/message_envelop.go +++ b/entity/message_envelop.go @@ -178,6 +178,21 @@ type MessageEnvelop struct { // // It is a required field for sending a chat action. Action ChatAction `json:"action"` + + // All Parameters for sendVenue method + + // Address of the venue + Address string `json:"address,omitempty"` + // FoursquareID of the venue + FoursquareID string `json:"foursquare_id,omitempty"` + // FoursquareType of the venue, if known. + // (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.) + FoursquareType string `json:"foursquare_type,omitempty"` + // GooglePlaceID of the venue + GooglePlaceID string `json:"google_place_id,omitempty"` + // GooglePlaceType of the venue. + // See supported types at https://developers.google.com/places/web-service/supported_types + GooglePlaceType string `json:"google_place_type,omitempty"` } // FileEnvelop represents a file to be uploaded to the telegram server.