Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By kbgodv1.4.0MITIn 1 marketplace
Build Telegram bots in Go with the lumex framework: routing, multi-step dialog flows, rich messages, Mini App initData verification and HTML widgets. Written for the kbgod/lumex framework specifically.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
1 marketplace, most starred first
Go, HTML, CSS, JavaScript
telegram-bot, telegram, bot-framework, mini-app, webhook, fsm, rich-messages
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Inspired by paulsonoflars/gotgbot.
All Telegram types and methods are produced by lumex's own stdlib-only generator (internal/gen) straight from the official Bot API docs into *_gen.go files. Bumping the API version is a single go run ./cmd/gen.
interface{} magic; polymorphic types are sealed interfaces with typed decoders and As<Variant>() accessorszerolog log adapter and testify mocks pull their own)ReplyKeyboard and InlineKeyboardInstall the library using the standard go get command:
go get github.com/kbgod/lumex/v2
This repo is also a Claude Code plugin that teaches the assistant how lumex works. Install it into your own bot project:
/plugin marketplace add kbgod/lumex
/plugin install lumex@lumex
It ships five skills: lumex (framework reference —
Context helpers, router filters/middleware/state, keyboard & rich-message
builders, polling/webhook), dialog-flows
(best practices for multi-step conversation flows / wizards),
rich-messages (building, sending and reading
rich messages with the ready-made constructors),
mini-app-auth (verifying Mini App initData
on your backend) and
telegram-widgets (writing HTML widgets and
the bot side behind them).
The simplest way to use the library — just call Telegram Bot API methods directly:
package main
import (
"context"
"os"
"github.com/kbgod/lumex/v2"
)
func main() {
bot, err := lumex.NewBot(os.Getenv("BOT_TOKEN"))
if err != nil {
panic(err)
}
message, err := bot.SendMessage(context.Background(), 123, "hello")
}
A complete example with graceful shutdown, structured logging, error handling, and panic recovery. Uses the recommended Dispatcher:
package main
import (
"context"
"log/slog"
"os"
"os/signal"
"syscall"
"time"
"github.com/kbgod/lumex/v2"
"github.com/kbgod/lumex/v2/dispatcher"
"github.com/kbgod/lumex/v2/router"
)
func main() {
interrupt := make(chan os.Signal, 1)
signal.Notify(interrupt, os.Interrupt, syscall.SIGINT, syscall.SIGQUIT, syscall.SIGTERM)
log := slog.New(slog.NewTextHandler(os.Stdout, nil))
bot, err := lumex.NewBot(os.Getenv("BOT_TOKEN"))
if err != nil {
log.Error("failed to create bot", "error", err)
return
}
log.Info("bot authorized successfully", "username", bot.Username)
r := router.New(bot, router.WithErrorHandler(func(ctx *router.Context, err error) {
log.Error("handle update error", "error", err, "update", ctx.Update)
}))
r.OnStart(func(ctx *router.Context) error {
return ctx.ReplyVoid("Hello, World!")
})
r.OnMessage(func(ctx *router.Context) error {
return ctx.ReplyVoid("Undefined command!")
})
d := dispatcher.New(bot, r)
7-day copy clicks
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground