{"modulePath":"github.com/tgbotkit/runtime","version":"v0.1.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package botcontext\n\nPackage botcontext provides a mechanism to embed and retrieve bot-specific context (Client, EventEmitter, Logger) within a standard context.Context.\n\n## Functions\n\n```go\nfunc WithBotContext(ctx context.Context, bot BotContext) context.Context\n```\nWithBotContext returns a new context with the BotContext embedded.\n\n## Types\n\n```go\ntype BotContext interface {\n\tClient() client.ClientWithResponsesInterface\n\tEventEmitter() eventemitter.EventEmitter\n\tLogger() logger.Logger\n}\n```\nBotContext provides access to bot capabilities without coupling to internals. It is embedded in context.Context and passed to handlers.\n\n```go\nfunc FromContext(ctx context.Context) BotContext\n```\nFromContext retrieves the BotContext from the context. It returns nil if the BotContext is not found.\n\n","path":"github.com/tgbotkit/runtime/botcontext","name":"botcontext","synopsis":"Package botcontext provides a mechanism to embed and retrieve bot-specific context (Client, EventEmitter, Logger) within a standard context.Context.","isRedistributable":true}
