update to latest telegram bot api
This commit is contained in:
parent
6bf83a8185
commit
d537d26a2b
3 changed files with 149 additions and 6 deletions
25
helpers.go
25
helpers.go
|
@ -153,6 +153,31 @@ func NewVideoShare(chatID int, fileID string) VideoConfig {
|
|||
}
|
||||
}
|
||||
|
||||
// NewVoiceUpload creates a new voice uploader.
|
||||
// This requires a file on the local filesystem to upload to Telegram.
|
||||
// Perhaps set a ChatAction of ChatRecordVideo or ChatUploadVideo while processing.
|
||||
//
|
||||
// chatID is where to send it, filename is the path to the file.
|
||||
func NewVoiceUpload(chatID int, filename string) VoiceConfig {
|
||||
return VoiceConfig{
|
||||
ChatID: chatID,
|
||||
UseExistingVoice: false,
|
||||
FilePath: filename,
|
||||
}
|
||||
}
|
||||
|
||||
// NewVoiceShare shares an existing voice.
|
||||
// You may use this to reshare an existing voice without reuploading it.
|
||||
//
|
||||
// chatID is where to send it, fileID is the ID of the video already uploaded.
|
||||
func NewVoiceShare(chatID int, fileID string) VoiceConfig {
|
||||
return VoiceConfig{
|
||||
ChatID: chatID,
|
||||
UseExistingVoice: true,
|
||||
FileID: fileID,
|
||||
}
|
||||
}
|
||||
|
||||
// NewLocation shares your location.
|
||||
// Perhaps set a ChatAction of ChatFindLocation while processing.
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue