Skip to content

Conversation

soaska
Copy link

@soaska soaska commented Nov 30, 2024

Now it should work like this:

bot, err := tgbotapi.NewBotAPIWithClient("YOUR_TOKEN", "https://your-custom-api.example.com/bot%s/%s", "https://your-custom-file-api.example.com/file/bot%s/%s", &http.Client{})
file, err := bot.GetFile(tgbotapi.FileConfig{FileID: "fileID"}, "https://your-custom-file-api.example.com/file/bot%s/%s")

I'm not sure if this work, I didn't edit tests. Pls check.

Now it should work like this:
```golang
bot, err := tgbotapi.NewBotAPIWithClient("YOUR_TOKEN", "https://your-custom-api.example.com/bot%s/%s", "https://your-custom-file-api.example.com/file/bot%s/%s", &http.Client{})
file, err := bot.GetFile(tgbotapi.FileConfig{FileID: "fileID"}, "https://your-custom-file-api.example.com/file/bot%s/%s")
```
@soaska soaska changed the title Custom file Custom file endpoint Nov 30, 2024
Co-authored-by: Valeriy Selitskiy <[email protected]>
@soaska soaska marked this pull request as ready for review December 2, 2024 11:39
@soaska soaska requested a review from zhuk-kk as a code owner December 2, 2024 11:39
@soaska soaska requested a review from iamwavecut December 4, 2024 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants