File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ import (
1919const (
2020 // APIEndpoint is the endpoint for all API methods, with formatting for Sprintf
2121 APIEndpoint = "https://api.telegram.org/bot%s/%s"
22+ // FileEndpoint is the endpoint for downloading a file from Telegram
23+ FileEndpoint = "https://api.telegram.org/file/bot%s/%s"
2224)
2325
2426// Constant values for ChatActions
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ type File struct {
183183//
184184// It requires the Bot Token to create the link.
185185func (f * File ) Link (token string ) string {
186- return fmt .Sprintf ("https://api.telegram.org/file/bot%s/%s" , token , f .FilePath )
186+ return fmt .Sprintf (FileEndpoint , token , f .FilePath )
187187}
188188
189189// ReplyKeyboardMarkup allows the Bot to set a custom keyboard.
You can’t perform that action at this time.
0 commit comments