0.8.0 beta 2

This commit is contained in:
2026-02-19 13:33:27 +03:00
parent 7b9292557e
commit 1bf7499496
3 changed files with 18 additions and 15 deletions

View File

@@ -2,9 +2,6 @@ package laniakea
import (
"encoding/json"
"fmt"
"io"
"net/http"
"git.nix13.pw/scuroneko/laniakea/tgapi"
)
@@ -39,13 +36,3 @@ func (bot *Bot[T]) Updates() ([]tgapi.Update, error) {
}
return updates, err
}
func (bot *Bot[T]) GetFileByLink(link string) ([]byte, error) {
u := fmt.Sprintf("https://api.telegram.org/file/bot%s/%s", bot.token, link)
res, err := http.Get(u)
if err != nil {
return nil, err
}
defer res.Body.Close()
return io.ReadAll(res.Body)
}