|
|
|
@ -2,6 +2,7 @@ package tgbotapi |
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
|
"encoding/json" |
|
|
|
|
"fmt" |
|
|
|
|
"time" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
@ -178,6 +179,13 @@ type File struct { |
|
|
|
|
FilePath string `json:"file_path"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Link returns a full path to the download URL for a File.
|
|
|
|
|
//
|
|
|
|
|
// It requires the Bot Token to create the link.
|
|
|
|
|
func (f *File) Link(token string) string { |
|
|
|
|
return fmt.Sprintf(FileEndpoint, token, f.FilePath) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// ReplyKeyboardMarkup allows the Bot to set a custom keyboard.
|
|
|
|
|
type ReplyKeyboardMarkup struct { |
|
|
|
|
Keyboard [][]string `json:"keyboard"` |
|
|
|
|