Versions in this module Expand all Collapse all v0 v0.1.0 Mar 7, 2026 Changes in this version + var AllUpdateTypes = []UpdateType + type Application struct + func NewApplication(bot *tg.Bot, opts ...Option) (*Application, error) + func (app *Application) AddHandler(handler Handler) + func (app *Application) Bot() *tg.Bot + func (app *Application) ProcessUpdate(ctx context.Context, update *Update) error + func (app *Application) RunPolling(ctx context.Context, opts ...PollingOption) error + func (app *Application) SetErrorHandler(handler ErrorHandler) + func (app *Application) WebhookHandler(secretToken string) http.Handler + type Context struct + Bot *tg.Bot + Update *Update + func (ctx *Context) Command() (string, string, bool) + func (ctx *Context) EffectiveMessage() *tg.Message + func (ctx *Context) UpdateType() UpdateType + type ErrorHandler func(context.Context, *Context, error) + type Filter interface + Match func(*Context) bool + func And(filters ...Filter) Filter + func AnyFilter() Filter + func CommandFilter() Filter + func Not(filter Filter) Filter + func Or(filters ...Filter) Filter + func RegexFilter(pattern *regexp.Regexp) Filter + func TextFilter() Filter + func UpdateTypeFilter(updateTypes ...UpdateType) Filter + type FilterFunc func(*Context) bool + func (fn FilterFunc) Match(ctx *Context) bool + type Handler interface + Handle func(context.Context, *Context) error + Match func(*Context) bool + func NewAnyHandler(fn HandlerFunc) Handler + func NewCallbackQueryHandler(pattern *regexp.Regexp, fn HandlerFunc) Handler + func NewCommandHandler(command string, fn HandlerFunc) Handler + func NewMessageHandler(filter Filter, fn HandlerFunc) Handler + func NewTypeHandler(updateType UpdateType, fn HandlerFunc) Handler + type HandlerFunc func(context.Context, *Context) error + type Option func(*Application) + func WithContinueOnError(enabled bool) Option + func WithErrorHandler(handler ErrorHandler) Option + func WithWebhookBodyLimit(limit int64) Option + type PollingOption = tg.UpdatePollerOption + func WithPollingAllowedUpdates(updateTypes ...UpdateType) PollingOption + func WithPollingNonBlockingDispatch() PollingOption + type Update struct + BusinessConnection *tg.BusinessConnection + BusinessMessage *tg.Message + CallbackQuery *tg.CallbackQuery + ChannelPost *tg.Message + ChatBoost *tg.ChatBoostUpdated + ChatJoinRequest *tg.ChatJoinRequest + ChatMember *tg.ChatMemberUpdated + ChosenInlineResult *tg.ChosenInlineResult + DeletedBusinessMessages *tg.BusinessMessagesDeleted + EditedBusinessMessage *tg.Message + EditedChannelPost *tg.Message + EditedMessage *tg.Message + InlineQuery *tg.InlineQuery + Message *tg.Message + MessageReaction *tg.MessageReactionUpdated + MessageReactionCount *tg.MessageReactionCountUpdated + MyChatMember *tg.ChatMemberUpdated + Poll *tg.Poll + PollAnswer *tg.PollAnswer + PreCheckoutQuery *tg.PreCheckoutQuery + PurchasedPaidMedia *tg.PaidMediaPurchased + RemovedChatBoost *tg.ChatBoostRemoved + ShippingQuery *tg.ShippingQuery + UpdateID int64 + func DecodeUpdate(data []byte) (*Update, error) + func DecodeUpdateFromReader(reader io.Reader) (*Update, error) + func WrapUpdate(update tg.Update) *Update + func (update *Update) Command() (string, string, bool) + func (update *Update) EffectiveMessage() *tg.Message + func (update *Update) Payload() any + func (update *Update) Type() UpdateType + type UpdateType string + const UpdateTypeBusinessConnection + const UpdateTypeBusinessMessage + const UpdateTypeCallbackQuery + const UpdateTypeChannelPost + const UpdateTypeChatBoost + const UpdateTypeChatJoinRequest + const UpdateTypeChatMember + const UpdateTypeChosenInlineResult + const UpdateTypeDeletedBusinessMessages + const UpdateTypeEditedBusinessMessage + const UpdateTypeEditedChannelPost + const UpdateTypeEditedMessage + const UpdateTypeInlineQuery + const UpdateTypeMessage + const UpdateTypeMessageReaction + const UpdateTypeMessageReactionCount + const UpdateTypeMyChatMember + const UpdateTypePoll + const UpdateTypePollAnswer + const UpdateTypePreCheckoutQuery + const UpdateTypePurchasedPaidMedia + const UpdateTypeRemovedChatBoost + const UpdateTypeShippingQuery + const UpdateTypeUnknown