Add helpers, change some items to pointers, add more inline results.
This commit is contained in:
parent
109da1a19f
commit
1ceb22b273
2 changed files with 145 additions and 70 deletions
28
helpers.go
28
helpers.go
|
@ -209,21 +209,43 @@ func NewVoiceShare(chatID int64, fileID string) VoiceConfig {
|
|||
}
|
||||
}
|
||||
|
||||
// NewContact allows you to send a shared contact.
|
||||
func NewContact(chatID int64, phoneNumber, firstName string) ContactConfig {
|
||||
return ContactConfig{
|
||||
BaseChat: BaseChat{
|
||||
ChatID: chatID,
|
||||
},
|
||||
PhoneNumber: phoneNumber,
|
||||
FirstName: firstName,
|
||||
}
|
||||
}
|
||||
|
||||
// NewLocation shares your location.
|
||||
//
|
||||
// chatID is where to send it, latitude and longitude are coordinates.
|
||||
func NewLocation(chatID int64, latitude float64, longitude float64) LocationConfig {
|
||||
return LocationConfig{
|
||||
BaseChat: BaseChat{
|
||||
ChatID: chatID,
|
||||
ReplyToMessageID: 0,
|
||||
ReplyMarkup: nil,
|
||||
ChatID: chatID,
|
||||
},
|
||||
Latitude: latitude,
|
||||
Longitude: longitude,
|
||||
}
|
||||
}
|
||||
|
||||
// NewVenue allows you to send a venue and its location.
|
||||
func NewVenue(chatID int64, title, address string, latitude, longitude float64) VenueConfig {
|
||||
return VenueConfig{
|
||||
BaseChat: BaseChat{
|
||||
ChatID: chatID,
|
||||
},
|
||||
Title: title,
|
||||
Address: address,
|
||||
Latitude: latitude,
|
||||
Longitude: longitude,
|
||||
}
|
||||
}
|
||||
|
||||
// NewChatAction sets a chat action.
|
||||
// Actions last for 5 seconds, or until your next action.
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue