Archived
1
This repository has been archived on 2022-11-04. You can view files and clone it, but cannot push or open issues or pull requests.
fwzookeeper/vendor/gitlab.com/toby3d/telegram/utils_input.go

51 lines
1.3 KiB
Go

package telegram
// NewInputTextMessageContent creates a new text of message.
func NewInputTextMessageContent(messageText string) *InputTextMessageContent {
return &InputTextMessageContent{
MessageText: messageText,
}
}
// NewInputLocationMessageContent creates a new location.
func NewInputLocationMessageContent(latitude, longitude float32) *InputLocationMessageContent {
return &InputLocationMessageContent{
Latitude: latitude,
Longitude: longitude,
}
}
// NewInputVenueMessageContent creates a new venue.
func NewInputVenueMessageContent(latitude, longitude float32, title, address string) *InputVenueMessageContent {
return &InputVenueMessageContent{
Latitude: latitude,
Longitude: longitude,
Title: title,
Address: address,
}
}
// NewInputContactMessageContent creates a new contact.
func NewInputContactMessageContent(phoneNumber, firstName string) *InputContactMessageContent {
return &InputContactMessageContent{
PhoneNumber: phoneNumber,
FirstName: firstName,
}
}
// NewInputMediaPhoto creates a new photo in media album.
func NewInputMediaPhoto(media string) *InputMediaPhoto {
return &InputMediaPhoto{
Type: TypePhoto,
Media: media,
}
}
// NewInputMediaVideo creates a new video in media album.
func NewInputMediaVideo(media string) *InputMediaVideo {
return &InputMediaVideo{
Type: TypeVideo,
Media: media,
}
}