Registry / messaging / go-telegram-bot-api-telegram-bot-api-v5

go-telegram-bot-api-telegram-bot-api-v5

JSON →
library5.5.1gogounverified

Package tgbotapi has functions and types used for interacting with the Telegram Bot API.

go get github.com/go-telegram-bot-api/telegram-bot-api/v5
INSTALL
IMPORT
SIG · GO-TELEGRAM-BOT-AP
G
go-telegram-bot-api-telegram-bot-api-v5
messaginggov5.5.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

tgbotapi
github.com/go-telegram-bot-api/telegram-bot-api/v5

Echo bot that replies with the same message.

package main import ( "log" "github.com/go-telegram-bot-api/telegram-bot-api/v5" ) func main() { bot, err := tgbotapi.NewBotAPI("YOUR_TOKEN") if err != nil { log.Panic(err) } u := tgbotapi.NewUpdate(0) u.Timeout = 60 updates := bot.GetUpdatesChan(u) for update := range updates { if update.Message != nil { msg := tgbotapi.NewMessage(update.Message.Chat.ID, update.Message.Text) bot.Send(msg) } } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
5.5.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources
go-telegram-bot-api-telegram-bot-api-v5 — go get go-telegram-bot-api-telegram-bot-api-v5 · libregistry