add missing const
parent
1bbe8c7bd2
commit
7092cefe65
|
@ -19,6 +19,8 @@ import (
|
||||||
const (
|
const (
|
||||||
// APIEndpoint is the endpoint for all API methods, with formatting for Sprintf
|
// APIEndpoint is the endpoint for all API methods, with formatting for Sprintf
|
||||||
APIEndpoint = "https://api.telegram.org/bot%s/%s"
|
APIEndpoint = "https://api.telegram.org/bot%s/%s"
|
||||||
|
// FileEndpoint is the endpoint for downloading a file from Telegram
|
||||||
|
FileEndpoint = "https://api.telegram.org/file/bot%s/%s"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Constant values for ChatActions
|
// Constant values for ChatActions
|
||||||
|
|
2
types.go
2
types.go
|
@ -183,7 +183,7 @@ type File struct {
|
||||||
//
|
//
|
||||||
// It requires the Bot Token to create the link.
|
// It requires the Bot Token to create the link.
|
||||||
func (f *File) Link(token string) string {
|
func (f *File) Link(token string) string {
|
||||||
return fmt.Sprintf("https://api.telegram.org/file/bot%s/%s", token, f.FilePath)
|
return fmt.Sprintf(FileEndpoint, token, f.FilePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReplyKeyboardMarkup allows the Bot to set a custom keyboard.
|
// ReplyKeyboardMarkup allows the Bot to set a custom keyboard.
|
||||||
|
|
Loading…
Reference in New Issue