Telegram Bot API Golang implementation
Bot API 6.0 (https://core.telegram.org/bots/api-changelog#april-16-2022)
go get github.com/nasermirzaei89/telegram
package main
import (
"context"
"github.com/nasermirzaei89/telegram"
"log"
"os"
)
func main() {
bot := telegram.New(os.Getenv("TOKEN"))
res, err := bot.GetUpdates(context.Background())
if err != nil {
log.Fatalln(err)
}
if res.IsOK() {
log.Printf("%+v", res.GetUpdates())
} else {
log.Printf("%d: %s", res.GetErrorCode(), res.GetDescription())
}
}
MIT License
You can submit a new issue in GitHub issues. Or you can create a fork, hack on your fork and when you're done create a pull request, so that the code contribution can get merged into the main package.