Documentation
¶
Overview ¶
Package gotelegram is the module root.
The public API lives in the api, client, transport, and dispatch packages. See https://github.com/lukaszraczylo/go-telegram for documentation.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package api contains the Telegram Bot API types and method wrappers.
|
Package api contains the Telegram Bot API types and method wrappers. |
|
Package client provides HTTP client primitives for the Telegram Bot API.
|
Package client provides HTTP client primitives for the Telegram Bot API. |
|
cmd
|
|
|
audit
command
Command audit reports IR-level codegen fallbacks and signature drift.
|
Command audit reports IR-level codegen fallbacks and signature drift. |
|
genapi
command
Command genapi reads internal/spec/api.json and emits api/*.gen.go.
|
Command genapi reads internal/spec/api.json and emits api/*.gen.go. |
|
scrape
command
Command scrape parses the Telegram Bot API HTML page into the IR (internal/spec.API) and writes it to internal/spec/api.json.
|
Command scrape parses the Telegram Bot API HTML page into the IR (internal/spec.API) and writes it to internal/spec/api.json. |
|
Package dispatch provides a typed router for Telegram updates.
|
Package dispatch provides a typed router for Telegram updates. |
|
conversation
Package conversation implements a stateful conversation handler for the go-telegram dispatch router.
|
Package conversation implements a stateful conversation handler for the go-telegram dispatch router. |
|
filters/callback
Package callback provides Filter helpers for *api.CallbackQuery payloads.
|
Package callback provides Filter helpers for *api.CallbackQuery payloads. |
|
filters/chatjoinrequest
Package chatjoinrequest provides Filter helpers for *api.ChatJoinRequest payloads.
|
Package chatjoinrequest provides Filter helpers for *api.ChatJoinRequest payloads. |
|
filters/chatmember
Package chatmember provides Filter helpers for *api.ChatMemberUpdated payloads.
|
Package chatmember provides Filter helpers for *api.ChatMemberUpdated payloads. |
|
filters/inline
Package inline provides Filter helpers for *api.InlineQuery payloads.
|
Package inline provides Filter helpers for *api.InlineQuery payloads. |
|
filters/message
Package message provides Filter helpers for *api.Message payloads.
|
Package message provides Filter helpers for *api.Message payloads. |
|
filters/precheckoutquery
Package precheckoutquery provides Filter helpers for *api.PreCheckoutQuery payloads.
|
Package precheckoutquery provides Filter helpers for *api.PreCheckoutQuery payloads. |
|
examples
|
|
|
admin
command
Package main demonstrates auth middleware that restricts the bot to an allowlist of Telegram user IDs.
|
Package main demonstrates auth middleware that restricts the bot to an allowlist of Telegram user IDs. |
|
callback
command
Package main demonstrates inline keyboards and callback queries with go-telegram.
|
Package main demonstrates inline keyboards and callback queries with go-telegram. |
|
conversation
command
Package main demonstrates a /newbot-style conversation flow using dispatch/conversation.
|
Package main demonstrates a /newbot-style conversation flow using dispatch/conversation. |
|
echo
command
Package main is a long-poll echo bot.
|
Package main is a long-poll echo bot. |
|
files
command
Package main demonstrates file upload and download with go-telegram.
|
Package main demonstrates file upload and download with go-telegram. |
|
inline
command
Package main demonstrates inline-mode queries with go-telegram.
|
Package main demonstrates inline-mode queries with go-telegram. |
|
middleware
command
Package main demonstrates custom middleware for go-telegram.
|
Package main demonstrates custom middleware for go-telegram. |
|
moderation
command
Package main demonstrates group moderation commands: /kick, /ban, /mute, /warn.
|
Package main demonstrates group moderation commands: /kick, /ban, /mute, /warn. |
|
pagination
command
Package main demonstrates multi-page inline keyboard navigation.
|
Package main demonstrates multi-page inline keyboard navigation. |
|
payments
command
Package main demonstrates the Telegram Payments flow:
|
Package main demonstrates the Telegram Payments flow: |
|
polls
command
Package main demonstrates creating polls and tallying answers via OnPollAnswer.
|
Package main demonstrates creating polls and tallying answers via OnPollAnswer. |
|
stateful
command
Package main demonstrates per-user state without globals via closures.
|
Package main demonstrates per-user state without globals via closures. |
|
webhook
command
Package main is a webhook bot.
|
Package main is a webhook bot. |
|
welcome
command
Package main demonstrates greeting new chat members and detecting leaves.
|
Package main demonstrates greeting new chat members and detecting leaves. |
|
internal
|
|
|
spec
Package spec defines the intermediate representation produced by the Telegram Bot API scraper (cmd/scrape) and consumed by the code generator (cmd/genapi).
|
Package spec defines the intermediate representation produced by the Telegram Bot API scraper (cmd/scrape) and consumed by the code generator (cmd/genapi). |
|
Package transport provides update delivery mechanisms (long-poll and webhook) that feed updates into the dispatch package's Router.
|
Package transport provides update delivery mechanisms (long-poll and webhook) that feed updates into the dispatch package's Router. |
Click to show internal directories.
Click to hide internal directories.