Files
go-telegram/docs/reference
lukaszraczylo e4614d800f feat(api): add api.Ptr helper for optional scalar fields
Telegram's optional int/bool/float fields are pointers so callers can
explicitly send false or 0 to override a chat default — distinct from
'absent', which uses the chat default. The pointer construction has been
ergonomically painful:

  photoLimit := int64(5)
  Limit: &photoLimit

api.Ptr[T any](v T) *T collapses that to a single line:

  Limit: api.Ptr[int64](5)
  DisableNotification: api.Ptr(true)

Pointers stay because the explicit-zero distinction matters for fields
like DisableNotification, ProtectContent, and getUpdates.Offset where
sending 0 / false explicitly is semantically different from omitting
the field.
2026-05-09 18:01:28 +01:00
..

API Reference

Auto-generated from Go source comments by gomarkdoc. Do not edit by hand — run make docs to regenerate.

Packages

Package Description
api Telegram Bot API types and method wrappers — 176 methods, 301 types, fully generated
client Bot client, codec, HTTP doer, retry middleware
transport Long-poll and webhook transports
dispatch Update router, filters, handler groups, named handlers
dispatch/conversation Multi-step conversation state machines
dispatch/filters/message Message filters — Command, Text, IsReply, etc.
dispatch/filters/callback Callback query filters
dispatch/filters/inline Inline query filters
dispatch/filters/chatmember Chat member update filters
dispatch/filters/chatjoinrequest Join request filters
dispatch/filters/precheckoutquery Pre-checkout filters for payments

Also see