{"id":44315463,"url":"https://github.com/en9inerd/telekit","last_synced_at":"2026-05-04T03:01:35.192Z","repository":{"id":337100764,"uuid":"1151944650","full_name":"en9inerd/telekit","owner":"en9inerd","description":"Simple framework for building Telegram bots using the MTProto protocol via gotd/td","archived":false,"fork":false,"pushed_at":"2026-05-03T20:00:28.000Z","size":105,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-03T20:29:08.515Z","etag":null,"topics":["bot","go","golang","mtproto","telegram"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/en9inerd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-07T05:41:35.000Z","updated_at":"2026-05-03T19:59:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/en9inerd/telekit","commit_stats":null,"previous_names":["en9inerd/telekit"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/en9inerd/telekit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/en9inerd%2Ftelekit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/en9inerd%2Ftelekit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/en9inerd%2Ftelekit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/en9inerd%2Ftelekit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/en9inerd","download_url":"https://codeload.github.com/en9inerd/telekit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/en9inerd%2Ftelekit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32592720,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","go","golang","mtproto","telegram"],"created_at":"2026-02-11T05:07:53.431Z","updated_at":"2026-05-04T03:01:35.179Z","avatar_url":"https://github.com/en9inerd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# telekit\n\nA simple framework for building Telegram bots using the MTProto protocol via [gotd/td](https://github.com/gotd/td).\n\n## Features\n\n- Event handling with filters (channels, users, message types)\n- Command parsing with typed parameter validation\n- Album (grouped media) handling\n- Command menu sync with scoped visibility\n- Bot profile management\n- Session management\n\n## Installation\n\n```bash\ngo get github.com/en9inerd/telekit\n```\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/en9inerd/telekit\"\n)\n\nfunc main() {\n\tbot, err := telekit.New(telekit.Config{\n\t\tAPIID:    12345,\n\t\tAPIHash:  \"your-api-hash\",\n\t\tBotToken: \"your-bot-token\",\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tbot.Command(\"start\", nil, func(ctx *telekit.Context) error {\n\t\treturn ctx.Reply(\"Hello!\")\n\t})\n\n\tbot.OnChannelPost(channelID, func(ctx *telekit.Context) error {\n\t\t// Handle new channel post\n\t\treturn nil\n\t})\n\n\tif err := bot.Run(context.Background()); err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n```\n\n## Documentation\n\nThe package documentation is auto-generated using [gomarkdoc](https://github.com/princjef/gomarkdoc).\n\n\u003c!-- gomarkdoc:embed:start --\u003e\n\n\u003c!-- Code generated by gomarkdoc. DO NOT EDIT --\u003e\n\n# telekit\n\n```go\nimport \"github.com/en9inerd/telekit\"\n```\n\nPackage telekit provides a simple framework for building Telegram bots using the MTProto protocol via gotd/td.\n\nIt simplifies common bot development tasks such as:\n\n- Event handling with filters \\(channels, users, message types\\)\n- Command parsing with typed parameter validation\n- Album \\(grouped media\\) handling\n- Session management\n\nBasic usage:\n\n```\nbot, err := telekit.New(telekit.Config{\n    APIID:    12345,\n    APIHash:  \"your-api-hash\",\n    BotToken: \"your-bot-token\",\n})\nif err != nil {\n    log.Fatal(err)\n}\n\nbot.OnChannelPost(channelID, func(ctx *telekit.Context) error {\n    // Handle new channel post\n    return nil\n})\n\nbot.Command(\"start\", nil, func(ctx *telekit.Context) error {\n    return ctx.Reply(\"Hello!\")\n})\n\nif err := bot.Run(context.Background()); err != nil {\n    log.Fatal(err)\n}\n```\n\n## Index\n\n- [Variables](\u003c#variables\u003e)\n- [func EntitiesToHTML\\(text string, entities \\[\\]tg.MessageEntityClass, opts ...Options\\) string](\u003c#EntitiesToHTML\u003e)\n- [type Bot](\u003c#Bot\u003e)\n  - [func New\\(cfg Config\\) \\(\\*Bot, error\\)](\u003c#New\u003e)\n  - [func \\(b \\*Bot\\) API\\(\\) \\*tg.Client](\u003c#Bot.API\u003e)\n  - [func \\(b \\*Bot\\) Command\\(name string, params Params, fn HandlerFunc\\)](\u003c#Bot.Command\u003e)\n  - [func \\(b \\*Bot\\) CommandFrom\\(name string, params Params, userIDs \\[\\]int64, fn HandlerFunc\\)](\u003c#Bot.CommandFrom\u003e)\n  - [func \\(b \\*Bot\\) CommandWithDesc\\(def CommandDef, fn HandlerFunc\\)](\u003c#Bot.CommandWithDesc\u003e)\n  - [func \\(b \\*Bot\\) CommandWithFilter\\(def CommandDef, filter Filter, fn HandlerFunc\\)](\u003c#Bot.CommandWithFilter\u003e)\n  - [func \\(b \\*Bot\\) DeleteProfilePhotos\\(ctx context.Context\\) error](\u003c#Bot.DeleteProfilePhotos\u003e)\n  - [func \\(b \\*Bot\\) LockedCommand\\(name string, params Params, fn HandlerFunc\\)](\u003c#Bot.LockedCommand\u003e)\n  - [func \\(b \\*Bot\\) LockedCommandFrom\\(name string, params Params, userIDs \\[\\]int64, fn HandlerFunc\\)](\u003c#Bot.LockedCommandFrom\u003e)\n  - [func \\(b \\*Bot\\) LockedCommandWithDesc\\(def CommandDef, fn HandlerFunc\\)](\u003c#Bot.LockedCommandWithDesc\u003e)\n  - [func \\(b \\*Bot\\) OnAlbum\\(filter Filter, fn HandlerFunc\\)](\u003c#Bot.OnAlbum\u003e)\n  - [func \\(b \\*Bot\\) OnCallback\\(filter CallbackFilter, fn CallbackFunc\\)](\u003c#Bot.OnCallback\u003e)\n  - [func \\(b \\*Bot\\) OnCallbackPrefix\\(prefix string, fn CallbackFunc\\)](\u003c#Bot.OnCallbackPrefix\u003e)\n  - [func \\(b \\*Bot\\) OnChannelDelete\\(channelID int64, fn DeleteFunc\\)](\u003c#Bot.OnChannelDelete\u003e)\n  - [func \\(b \\*Bot\\) OnChannelEdit\\(channelID int64, fn HandlerFunc\\)](\u003c#Bot.OnChannelEdit\u003e)\n  - [func \\(b \\*Bot\\) OnChannelPost\\(channelID int64, fn HandlerFunc\\)](\u003c#Bot.OnChannelPost\u003e)\n  - [func \\(b \\*Bot\\) OnDelete\\(filter DeleteFilter, fn DeleteFunc\\)](\u003c#Bot.OnDelete\u003e)\n  - [func \\(b \\*Bot\\) OnEdit\\(filter Filter, fn HandlerFunc\\)](\u003c#Bot.OnEdit\u003e)\n  - [func \\(b \\*Bot\\) OnMessage\\(filter Filter, fn HandlerFunc\\)](\u003c#Bot.OnMessage\u003e)\n  - [func \\(b \\*Bot\\) OnPrivateMessage\\(userIDs \\[\\]int64, fn HandlerFunc\\)](\u003c#Bot.OnPrivateMessage\u003e)\n  - [func \\(b \\*Bot\\) OnReady\\(fn func\\(ctx context.Context\\)\\)](\u003c#Bot.OnReady\u003e)\n  - [func \\(b \\*Bot\\) ResetCommands\\(ctx context.Context\\) error](\u003c#Bot.ResetCommands\u003e)\n  - [func \\(b \\*Bot\\) ResolveChannelInfo\\(ctx context.Context, identifier string\\) \\(\\*ChannelInfo, error\\)](\u003c#Bot.ResolveChannelInfo\u003e)\n  - [func \\(b \\*Bot\\) ResolveUserInfo\\(ctx context.Context, identifier string\\) \\(\\*UserInfo, error\\)](\u003c#Bot.ResolveUserInfo\u003e)\n  - [func \\(b \\*Bot\\) Run\\(ctx context.Context\\) error](\u003c#Bot.Run\u003e)\n  - [func \\(b \\*Bot\\) SelfID\\(\\) int64](\u003c#Bot.SelfID\u003e)\n  - [func \\(b \\*Bot\\) SetCommandsForScope\\(ctx context.Context, scope CommandScope, langCode string, commands \\[\\]CommandRegistration\\) error](\u003c#Bot.SetCommandsForScope\u003e)\n  - [func \\(b \\*Bot\\) SetProfilePhoto\\(ctx context.Context, photoURL string\\) error](\u003c#Bot.SetProfilePhoto\u003e)\n  - [func \\(b \\*Bot\\) SetProfilePhotoFromBytes\\(ctx context.Context, data \\[\\]byte, filename string\\) error](\u003c#Bot.SetProfilePhotoFromBytes\u003e)\n  - [func \\(b \\*Bot\\) SyncCommands\\(ctx context.Context\\) error](\u003c#Bot.SyncCommands\u003e)\n  - [func \\(b \\*Bot\\) UpdateBotInfo\\(ctx context.Context, info BotInfo\\) error](\u003c#Bot.UpdateBotInfo\u003e)\n- [type BotInfo](\u003c#BotInfo\u003e)\n- [type CallbackContext](\u003c#CallbackContext\u003e)\n  - [func \\(c \\*CallbackContext\\) API\\(\\) \\*tg.Client](\u003c#CallbackContext.API\u003e)\n  - [func \\(c \\*CallbackContext\\) Answer\\(text string, alert bool\\) error](\u003c#CallbackContext.Answer\u003e)\n  - [func \\(c \\*CallbackContext\\) AnswerEmpty\\(\\) error](\u003c#CallbackContext.AnswerEmpty\u003e)\n  - [func \\(c \\*CallbackContext\\) ChatID\\(\\) int64](\u003c#CallbackContext.ChatID\u003e)\n  - [func \\(c \\*CallbackContext\\) Data\\(\\) string](\u003c#CallbackContext.Data\u003e)\n  - [func \\(c \\*CallbackContext\\) MessageID\\(\\) int](\u003c#CallbackContext.MessageID\u003e)\n  - [func \\(c \\*CallbackContext\\) Query\\(\\) \\*tg.UpdateBotCallbackQuery](\u003c#CallbackContext.Query\u003e)\n  - [func \\(c \\*CallbackContext\\) UserID\\(\\) int64](\u003c#CallbackContext.UserID\u003e)\n- [type CallbackFilter](\u003c#CallbackFilter\u003e)\n- [type CallbackFunc](\u003c#CallbackFunc\u003e)\n- [type ChannelInfo](\u003c#ChannelInfo\u003e)\n- [type CommandDef](\u003c#CommandDef\u003e)\n- [type CommandLock](\u003c#CommandLock\u003e)\n  - [func NewCommandLock\\(\\) \\*CommandLock](\u003c#NewCommandLock\u003e)\n  - [func \\(l \\*CommandLock\\) TryAcquire\\(userID int64, acquire bool\\) bool](\u003c#CommandLock.TryAcquire\u003e)\n  - [func \\(l \\*CommandLock\\) Unlock\\(userID int64\\)](\u003c#CommandLock.Unlock\u003e)\n- [type CommandRegistration](\u003c#CommandRegistration\u003e)\n- [type CommandScope](\u003c#CommandScope\u003e)\n- [type Config](\u003c#Config\u003e)\n- [type Context](\u003c#Context\u003e)\n  - [func \\(c \\*Context\\) API\\(\\) \\*tg.Client](\u003c#Context.API\u003e)\n  - [func \\(c \\*Context\\) ChatID\\(\\) int64](\u003c#Context.ChatID\u003e)\n  - [func \\(c \\*Context\\) Entities\\(\\) \\[\\]tg.MessageEntityClass](\u003c#Context.Entities\u003e)\n  - [func \\(c \\*Context\\) IsChannel\\(\\) bool](\u003c#Context.IsChannel\u003e)\n  - [func \\(c \\*Context\\) IsGroup\\(\\) bool](\u003c#Context.IsGroup\u003e)\n  - [func \\(c \\*Context\\) IsOutgoing\\(\\) bool](\u003c#Context.IsOutgoing\u003e)\n  - [func \\(c \\*Context\\) IsPrivate\\(\\) bool](\u003c#Context.IsPrivate\u003e)\n  - [func \\(c \\*Context\\) Media\\(\\) tg.MessageMediaClass](\u003c#Context.Media\u003e)\n  - [func \\(c \\*Context\\) Message\\(\\) \\*tg.Message](\u003c#Context.Message\u003e)\n  - [func \\(c \\*Context\\) MessageID\\(\\) int](\u003c#Context.MessageID\u003e)\n  - [func \\(c \\*Context\\) Messages\\(\\) \\[\\]\\*tg.Message](\u003c#Context.Messages\u003e)\n  - [func \\(c \\*Context\\) Param\\(key string\\) any](\u003c#Context.Param\u003e)\n  - [func \\(c \\*Context\\) Params\\(\\) ParsedParams](\u003c#Context.Params\u003e)\n  - [func \\(c \\*Context\\) Reply\\(text string\\) error](\u003c#Context.Reply\u003e)\n  - [func \\(c \\*Context\\) Send\\(text string\\) error](\u003c#Context.Send\u003e)\n  - [func \\(c \\*Context\\) SendTo\\(userID int64, text string\\) error](\u003c#Context.SendTo\u003e)\n  - [func \\(c \\*Context\\) SenderID\\(\\) int64](\u003c#Context.SenderID\u003e)\n  - [func \\(c \\*Context\\) Text\\(\\) string](\u003c#Context.Text\u003e)\n  - [func \\(c \\*Context\\) Update\\(\\) tg.UpdateClass](\u003c#Context.Update\u003e)\n- [type DeleteContext](\u003c#DeleteContext\u003e)\n  - [func \\(c \\*DeleteContext\\) API\\(\\) \\*tg.Client](\u003c#DeleteContext.API\u003e)\n  - [func \\(c \\*DeleteContext\\) ChannelID\\(\\) int64](\u003c#DeleteContext.ChannelID\u003e)\n  - [func \\(c \\*DeleteContext\\) ChatID\\(\\) int64](\u003c#DeleteContext.ChatID\u003e)\n  - [func \\(c \\*DeleteContext\\) MessageIDs\\(\\) \\[\\]int](\u003c#DeleteContext.MessageIDs\u003e)\n- [type DeleteFilter](\u003c#DeleteFilter\u003e)\n- [type DeleteFunc](\u003c#DeleteFunc\u003e)\n- [type Filter](\u003c#Filter\u003e)\n- [type HandlerFunc](\u003c#HandlerFunc\u003e)\n- [type Options](\u003c#Options\u003e)\n- [type ParamSchema](\u003c#ParamSchema\u003e)\n- [type ParamType](\u003c#ParamType\u003e)\n- [type Params](\u003c#Params\u003e)\n- [type ParsedParams](\u003c#ParsedParams\u003e)\n  - [func \\(p ParsedParams\\) Bool\\(key string\\) bool](\u003c#ParsedParams.Bool\u003e)\n  - [func \\(p ParsedParams\\) Has\\(key string\\) bool](\u003c#ParsedParams.Has\u003e)\n  - [func \\(p ParsedParams\\) Int\\(key string\\) int64](\u003c#ParsedParams.Int\u003e)\n  - [func \\(p ParsedParams\\) String\\(key string\\) string](\u003c#ParsedParams.String\u003e)\n- [type ScopeAllGroupAdmins](\u003c#ScopeAllGroupAdmins\u003e)\n- [type ScopeAllGroups](\u003c#ScopeAllGroups\u003e)\n- [type ScopeAllPrivate](\u003c#ScopeAllPrivate\u003e)\n- [type ScopeChannel](\u003c#ScopeChannel\u003e)\n- [type ScopeChannelAdmins](\u003c#ScopeChannelAdmins\u003e)\n- [type ScopeChannelUsername](\u003c#ScopeChannelUsername\u003e)\n- [type ScopeChat](\u003c#ScopeChat\u003e)\n- [type ScopeChatAdmins](\u003c#ScopeChatAdmins\u003e)\n- [type ScopeChatMember](\u003c#ScopeChatMember\u003e)\n- [type ScopeChatMemberChannel](\u003c#ScopeChatMemberChannel\u003e)\n- [type ScopeDefault](\u003c#ScopeDefault\u003e)\n- [type ScopeUser](\u003c#ScopeUser\u003e)\n- [type ScopeUsername](\u003c#ScopeUsername\u003e)\n- [type UserInfo](\u003c#UserInfo\u003e)\n\n\n## Variables\n\n\u003ca name=\"ErrMissingAPIID\"\u003e\u003c/a\u003eConfiguration errors\n\n```go\nvar (\n    ErrMissingAPIID    = errors.New(\"telekit: API ID is required\")\n    ErrMissingAPIHash  = errors.New(\"telekit: API hash is required\")\n    ErrMissingBotToken = errors.New(\"telekit: bot token is required\")\n)\n```\n\n\u003ca name=\"ErrBotNotRunning\"\u003e\u003c/a\u003eRuntime errors\n\n```go\nvar (\n    ErrBotNotRunning  = errors.New(\"telekit: bot is not running\")\n    ErrAlreadyRunning = errors.New(\"telekit: bot is already running\")\n)\n```\n\n\u003ca name=\"EntitiesToHTML\"\u003e\u003c/a\u003e\n## func EntitiesToHTML\n\n```go\nfunc EntitiesToHTML(text string, entities []tg.MessageEntityClass, opts ...Options) string\n```\n\nEntitiesToHTML converts Telegram message entities to HTML. Properly handles overlapping/nested entities.\n\n\u003ca name=\"Bot\"\u003e\u003c/a\u003e\n## type Bot\n\nBot is the main Telegram bot client.\n\n```go\ntype Bot struct {\n    // contains filtered or unexported fields\n}\n```\n\n\u003ca name=\"New\"\u003e\u003c/a\u003e\n### func New\n\n```go\nfunc New(cfg Config) (*Bot, error)\n```\n\nNew creates a new Bot with the given configuration.\n\n\u003ca name=\"Bot.API\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) API\n\n```go\nfunc (b *Bot) API() *tg.Client\n```\n\nAPI returns the raw tg.Client for advanced operations.\n\n\u003ca name=\"Bot.Command\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) Command\n\n```go\nfunc (b *Bot) Command(name string, params Params, fn HandlerFunc)\n```\n\nCommand registers a command handler with optional parameter schema.\n\n\u003ca name=\"Bot.CommandFrom\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) CommandFrom\n\n```go\nfunc (b *Bot) CommandFrom(name string, params Params, userIDs []int64, fn HandlerFunc)\n```\n\nCommandFrom registers a command handler that only responds to specific users.\n\n\u003ca name=\"Bot.CommandWithDesc\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) CommandWithDesc\n\n```go\nfunc (b *Bot) CommandWithDesc(def CommandDef, fn HandlerFunc)\n```\n\nCommandWithDesc registers a command with description \\(for menu sync\\).\n\n\u003ca name=\"Bot.CommandWithFilter\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) CommandWithFilter\n\n```go\nfunc (b *Bot) CommandWithFilter(def CommandDef, filter Filter, fn HandlerFunc)\n```\n\nCommandWithFilter registers a command handler with a custom filter.\n\n\u003ca name=\"Bot.DeleteProfilePhotos\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) DeleteProfilePhotos\n\n```go\nfunc (b *Bot) DeleteProfilePhotos(ctx context.Context) error\n```\n\nDeleteProfilePhotos deletes the bot's profile photos.\n\n\u003ca name=\"Bot.LockedCommand\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) LockedCommand\n\n```go\nfunc (b *Bot) LockedCommand(name string, params Params, fn HandlerFunc)\n```\n\nLockedCommand registers a command with mutual exclusion.\n\n\u003ca name=\"Bot.LockedCommandFrom\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) LockedCommandFrom\n\n```go\nfunc (b *Bot) LockedCommandFrom(name string, params Params, userIDs []int64, fn HandlerFunc)\n```\n\nLockedCommandFrom registers a locked command for specific users.\n\n\u003ca name=\"Bot.LockedCommandWithDesc\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) LockedCommandWithDesc\n\n```go\nfunc (b *Bot) LockedCommandWithDesc(def CommandDef, fn HandlerFunc)\n```\n\nLockedCommandWithDesc registers a locked command with description.\n\n\u003ca name=\"Bot.OnAlbum\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) OnAlbum\n\n```go\nfunc (b *Bot) OnAlbum(filter Filter, fn HandlerFunc)\n```\n\nOnAlbum registers a handler for albums \\(grouped media\\).\n\n\u003ca name=\"Bot.OnCallback\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) OnCallback\n\n```go\nfunc (b *Bot) OnCallback(filter CallbackFilter, fn CallbackFunc)\n```\n\nOnCallback registers a handler for callback queries \\(inline button clicks\\).\n\n\u003ca name=\"Bot.OnCallbackPrefix\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) OnCallbackPrefix\n\n```go\nfunc (b *Bot) OnCallbackPrefix(prefix string, fn CallbackFunc)\n```\n\nOnCallbackPrefix registers a handler for callback queries with a specific data prefix.\n\n\u003ca name=\"Bot.OnChannelDelete\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) OnChannelDelete\n\n```go\nfunc (b *Bot) OnChannelDelete(channelID int64, fn DeleteFunc)\n```\n\nOnChannelDelete registers a handler for deleted channel messages.\n\n\u003ca name=\"Bot.OnChannelEdit\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) OnChannelEdit\n\n```go\nfunc (b *Bot) OnChannelEdit(channelID int64, fn HandlerFunc)\n```\n\nOnChannelEdit registers a handler for edited channel posts.\n\n\u003ca name=\"Bot.OnChannelPost\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) OnChannelPost\n\n```go\nfunc (b *Bot) OnChannelPost(channelID int64, fn HandlerFunc)\n```\n\nOnChannelPost registers a handler for new channel posts.\n\n\u003ca name=\"Bot.OnDelete\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) OnDelete\n\n```go\nfunc (b *Bot) OnDelete(filter DeleteFilter, fn DeleteFunc)\n```\n\nOnDelete registers a handler for deleted messages.\n\n\u003ca name=\"Bot.OnEdit\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) OnEdit\n\n```go\nfunc (b *Bot) OnEdit(filter Filter, fn HandlerFunc)\n```\n\nOnEdit registers a handler for edited messages.\n\n\u003ca name=\"Bot.OnMessage\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) OnMessage\n\n```go\nfunc (b *Bot) OnMessage(filter Filter, fn HandlerFunc)\n```\n\nOnMessage registers a handler for new messages.\n\n\u003ca name=\"Bot.OnPrivateMessage\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) OnPrivateMessage\n\n```go\nfunc (b *Bot) OnPrivateMessage(userIDs []int64, fn HandlerFunc)\n```\n\nOnPrivateMessage registers a handler for private messages from specific users.\n\n\u003ca name=\"Bot.OnReady\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) OnReady\n\n```go\nfunc (b *Bot) OnReady(fn func(ctx context.Context))\n```\n\nOnReady sets a callback that's called when the bot is connected and ready.\n\n\u003ca name=\"Bot.ResetCommands\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) ResetCommands\n\n```go\nfunc (b *Bot) ResetCommands(ctx context.Context) error\n```\n\nResetCommands removes all bot commands from Telegram. It resets commands for all scope\\+langCode combinations that were previously saved.\n\n\u003ca name=\"Bot.ResolveChannelInfo\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) ResolveChannelInfo\n\n```go\nfunc (b *Bot) ResolveChannelInfo(ctx context.Context, identifier string) (*ChannelInfo, error)\n```\n\nResolveChannelInfo resolves a channel by @username or numeric ID. For numeric IDs, AccessHash is 0 \\(valid for bots that are members of the channel\\).\n\n\u003ca name=\"Bot.ResolveUserInfo\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) ResolveUserInfo\n\n```go\nfunc (b *Bot) ResolveUserInfo(ctx context.Context, identifier string) (*UserInfo, error)\n```\n\nResolveUserInfo resolves a user by @username or numeric ID. For numeric IDs, AccessHash is 0 \\(valid for bots that have interacted with the user\\).\n\n\u003ca name=\"Bot.Run\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) Run\n\n```go\nfunc (b *Bot) Run(ctx context.Context) error\n```\n\nRun starts the bot and blocks until the context is cancelled.\n\n\u003ca name=\"Bot.SelfID\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) SelfID\n\n```go\nfunc (b *Bot) SelfID() int64\n```\n\nSelfID returns the bot's user ID.\n\n\u003ca name=\"Bot.SetCommandsForScope\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) SetCommandsForScope\n\n```go\nfunc (b *Bot) SetCommandsForScope(ctx context.Context, scope CommandScope, langCode string, commands []CommandRegistration) error\n```\n\nSetCommandsForScope sets commands for a specific scope and language. Username\\-based scopes \\(ScopeChannelUsername, ScopeUsername\\) are resolved automatically.\n\n\u003ca name=\"Bot.SetProfilePhoto\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) SetProfilePhoto\n\n```go\nfunc (b *Bot) SetProfilePhoto(ctx context.Context, photoURL string) error\n```\n\nSetProfilePhoto sets the bot's profile photo from a URL.\n\n\u003ca name=\"Bot.SetProfilePhotoFromBytes\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) SetProfilePhotoFromBytes\n\n```go\nfunc (b *Bot) SetProfilePhotoFromBytes(ctx context.Context, data []byte, filename string) error\n```\n\nSetProfilePhotoFromBytes sets the bot's profile photo from raw bytes.\n\n\u003ca name=\"Bot.SyncCommands\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) SyncCommands\n\n```go\nfunc (b *Bot) SyncCommands(ctx context.Context) error\n```\n\nSyncCommands registers all commands with Telegram so they appear in the bot menu. It resets previous command scopes and sets new ones based on registered commands. Should be called after all commands are registered and the bot is running.\n\n\u003ca name=\"Bot.UpdateBotInfo\"\u003e\u003c/a\u003e\n### func \\(\\*Bot\\) UpdateBotInfo\n\n```go\nfunc (b *Bot) UpdateBotInfo(ctx context.Context, info BotInfo) error\n```\n\nUpdateBotInfo updates the bot's profile information. Only non\\-empty fields are updated.\n\n\u003ca name=\"BotInfo\"\u003e\u003c/a\u003e\n## type BotInfo\n\nBotInfo holds bot profile information.\n\n```go\ntype BotInfo struct {\n    // Name is the bot's display name.\n    Name string\n\n    // About is the short description shown in the bot's profile.\n    About string\n\n    // Description is the longer description shown when starting the bot.\n    Description string\n\n    // LangCode is the language code for this info.\n    // Empty string means default language.\n    LangCode string\n}\n```\n\n\u003ca name=\"CallbackContext\"\u003e\u003c/a\u003e\n## type CallbackContext\n\nCallbackContext provides access to callback query data.\n\n```go\ntype CallbackContext struct {\n    context.Context\n    // contains filtered or unexported fields\n}\n```\n\n\u003ca name=\"CallbackContext.API\"\u003e\u003c/a\u003e\n### func \\(\\*CallbackContext\\) API\n\n```go\nfunc (c *CallbackContext) API() *tg.Client\n```\n\nAPI returns the raw tg.Client for advanced operations.\n\n\u003ca name=\"CallbackContext.Answer\"\u003e\u003c/a\u003e\n### func \\(\\*CallbackContext\\) Answer\n\n```go\nfunc (c *CallbackContext) Answer(text string, alert bool) error\n```\n\nAnswer sends an answer to the callback query \\(toast/alert\\).\n\n\u003ca name=\"CallbackContext.AnswerEmpty\"\u003e\u003c/a\u003e\n### func \\(\\*CallbackContext\\) AnswerEmpty\n\n```go\nfunc (c *CallbackContext) AnswerEmpty() error\n```\n\nAnswerEmpty acknowledges the callback without showing anything.\n\n\u003ca name=\"CallbackContext.ChatID\"\u003e\u003c/a\u003e\n### func \\(\\*CallbackContext\\) ChatID\n\n```go\nfunc (c *CallbackContext) ChatID() int64\n```\n\nChatID returns the chat ID where the button was clicked.\n\n\u003ca name=\"CallbackContext.Data\"\u003e\u003c/a\u003e\n### func \\(\\*CallbackContext\\) Data\n\n```go\nfunc (c *CallbackContext) Data() string\n```\n\nData returns the callback data string.\n\n\u003ca name=\"CallbackContext.MessageID\"\u003e\u003c/a\u003e\n### func \\(\\*CallbackContext\\) MessageID\n\n```go\nfunc (c *CallbackContext) MessageID() int\n```\n\nMessageID returns the message ID containing the button.\n\n\u003ca name=\"CallbackContext.Query\"\u003e\u003c/a\u003e\n### func \\(\\*CallbackContext\\) Query\n\n```go\nfunc (c *CallbackContext) Query() *tg.UpdateBotCallbackQuery\n```\n\nQuery returns the raw callback query.\n\n\u003ca name=\"CallbackContext.UserID\"\u003e\u003c/a\u003e\n### func \\(\\*CallbackContext\\) UserID\n\n```go\nfunc (c *CallbackContext) UserID() int64\n```\n\nUserID returns the user who clicked the button.\n\n\u003ca name=\"CallbackFilter\"\u003e\u003c/a\u003e\n## type CallbackFilter\n\nCallbackFilter defines conditions for callback query handlers.\n\n```go\ntype CallbackFilter struct {\n    // Data filters by callback data prefix.\n    DataPrefix string\n\n    // Users filters by user IDs.\n    Users []int64\n\n    // Custom is a custom filter function.\n    Custom func(ctx *CallbackContext) bool\n}\n```\n\n\u003ca name=\"CallbackFunc\"\u003e\u003c/a\u003e\n## type CallbackFunc\n\nCallbackFunc is the function signature for callback query handlers.\n\n```go\ntype CallbackFunc func(ctx *CallbackContext) error\n```\n\n\u003ca name=\"ChannelInfo\"\u003e\u003c/a\u003e\n## type ChannelInfo\n\nChannelInfo contains resolved channel information.\n\n```go\ntype ChannelInfo struct {\n    ID         int64\n    AccessHash int64\n    Username   string // empty for private channels or when resolved by numeric ID\n    Title      string // empty when resolved by numeric ID\n}\n```\n\n\u003ca name=\"CommandDef\"\u003e\u003c/a\u003e\n## type CommandDef\n\nCommandDef defines a command with its metadata.\n\n```go\ntype CommandDef struct {\n    // Name is the command name without the leading slash.\n    Name string\n\n    // Description is shown in the bot's command menu.\n    Description string\n\n    // Params defines the parameter schema for validation.\n    Params Params\n\n    // Locked enables mutual exclusion for this command.\n    // When true, this command blocks other locked commands for the same user.\n    Locked bool\n\n    // Scope defines where the command is available (default: ScopeDefault).\n    Scope CommandScope\n\n    // LangCode is the language code for this command's description.\n    LangCode string\n}\n```\n\n\u003ca name=\"CommandLock\"\u003e\u003c/a\u003e\n## type CommandLock\n\nCommandLock provides mutual exclusion for locked commands per user. Locked commands block other locked commands for the same user. Non\\-locked commands always run without blocking.\n\n```go\ntype CommandLock struct {\n    // contains filtered or unexported fields\n}\n```\n\n\u003ca name=\"NewCommandLock\"\u003e\u003c/a\u003e\n### func NewCommandLock\n\n```go\nfunc NewCommandLock() *CommandLock\n```\n\nNewCommandLock creates a new CommandLock.\n\n\u003ca name=\"CommandLock.TryAcquire\"\u003e\u003c/a\u003e\n### func \\(\\*CommandLock\\) TryAcquire\n\n```go\nfunc (l *CommandLock) TryAcquire(userID int64, acquire bool) bool\n```\n\nTryAcquire checks if command can proceed and optionally acquires lock. If acquire is false, always returns true. If acquire is true, returns true only if lock was acquired.\n\n\u003ca name=\"CommandLock.Unlock\"\u003e\u003c/a\u003e\n### func \\(\\*CommandLock\\) Unlock\n\n```go\nfunc (l *CommandLock) Unlock(userID int64)\n```\n\nUnlock releases the lock for user.\n\n\u003ca name=\"CommandRegistration\"\u003e\u003c/a\u003e\n## type CommandRegistration\n\nCommandRegistration holds command info for syncing to Telegram.\n\n```go\ntype CommandRegistration struct {\n    // Name is the command name without leading slash.\n    Name string\n\n    // Description is shown in the bot menu.\n    Description string\n\n    // Scope defines where the command is available.\n    // Defaults to ScopeDefault if nil.\n    Scope CommandScope\n\n    // LangCode is the language code for this registration.\n    // Empty string means all languages.\n    LangCode string\n}\n```\n\n\u003ca name=\"CommandScope\"\u003e\u003c/a\u003e\n## type CommandScope\n\nCommandScope defines where a command should be available.\n\n```go\ntype CommandScope interface {\n    // contains filtered or unexported methods\n}\n```\n\n\u003ca name=\"Config\"\u003e\u003c/a\u003e\n## type Config\n\nConfig holds the configuration for the bot.\n\n```go\ntype Config struct {\n    // APIID is the Telegram API ID from https://my.telegram.org\n    APIID int\n\n    // APIHash is the Telegram API hash from https://my.telegram.org\n    APIHash string\n\n    // BotToken is the bot token from @BotFather\n    BotToken string\n\n    // SessionDir is the directory for storing session data.\n    // Defaults to \"./session\" if empty.\n    SessionDir string\n\n    // Logger is the logger to use. If nil, a default logger is created.\n    Logger *slog.Logger\n\n    // DeviceModel is the device model to report to Telegram.\n    // Defaults to \"telekit\" if empty.\n    DeviceModel string\n\n    // SystemVersion is the system version to report to Telegram.\n    // Defaults to \"1.0\" if empty.\n    SystemVersion string\n\n    // AppVersion is the app version to report to Telegram.\n    // Defaults to \"1.0.0\" if empty.\n    AppVersion string\n\n    // LangCode is the language code to report to Telegram.\n    // Defaults to \"en\" if empty.\n    LangCode string\n\n    // SystemLangCode is the system language code.\n    // Defaults to \"en\" if empty.\n    SystemLangCode string\n\n    // AlbumTimeout is the duration to wait for grouped messages.\n    // Defaults to 500ms if zero.\n    AlbumTimeout time.Duration\n\n    // SyncCommands automatically syncs commands to Telegram after OnReady.\n    // Commands registered in OnReady will be included.\n    SyncCommands bool\n\n    // BotInfo is the bot profile information to set on startup.\n    // If set, the bot info will be updated when the bot starts.\n    BotInfo *BotInfo\n\n    // ProfilePhotoURL is the URL of the bot's profile photo.\n    // If set, the profile photo will be updated when the bot starts.\n    ProfilePhotoURL string\n\n    // Verbose enables debug logging for the MTProto client.\n    Verbose bool\n}\n```\n\n\u003ca name=\"Context\"\u003e\u003c/a\u003e\n## type Context\n\nContext provides access to the current update and utility methods.\n\n```go\ntype Context struct {\n    context.Context\n    // contains filtered or unexported fields\n}\n```\n\n\u003ca name=\"Context.API\"\u003e\u003c/a\u003e\n### func \\(\\*Context\\) API\n\n```go\nfunc (c *Context) API() *tg.Client\n```\n\nAPI returns the raw tg.Client for advanced operations.\n\n\u003ca name=\"Context.ChatID\"\u003e\u003c/a\u003e\n### func \\(\\*Context\\) ChatID\n\n```go\nfunc (c *Context) ChatID() int64\n```\n\nChatID returns the chat ID where the message was sent.\n\n\u003ca name=\"Context.Entities\"\u003e\u003c/a\u003e\n### func \\(\\*Context\\) Entities\n\n```go\nfunc (c *Context) Entities() []tg.MessageEntityClass\n```\n\nEntities returns the message entities \\(formatting\\).\n\n\u003ca name=\"Context.IsChannel\"\u003e\u003c/a\u003e\n### func \\(\\*Context\\) IsChannel\n\n```go\nfunc (c *Context) IsChannel() bool\n```\n\nIsChannel returns true if the message is from a channel.\n\n\u003ca name=\"Context.IsGroup\"\u003e\u003c/a\u003e\n### func \\(\\*Context\\) IsGroup\n\n```go\nfunc (c *Context) IsGroup() bool\n```\n\nIsGroup returns true if the message is from a group.\n\n\u003ca name=\"Context.IsOutgoing\"\u003e\u003c/a\u003e\n### func \\(\\*Context\\) IsOutgoing\n\n```go\nfunc (c *Context) IsOutgoing() bool\n```\n\nIsOutgoing returns true if this is an outgoing message.\n\n\u003ca name=\"Context.IsPrivate\"\u003e\u003c/a\u003e\n### func \\(\\*Context\\) IsPrivate\n\n```go\nfunc (c *Context) IsPrivate() bool\n```\n\nIsPrivate returns true if the message is from a private chat.\n\n\u003ca name=\"Context.Media\"\u003e\u003c/a\u003e\n### func \\(\\*Context\\) Media\n\n```go\nfunc (c *Context) Media() tg.MessageMediaClass\n```\n\nMedia returns the message media \\(photo, video, etc.\\).\n\n\u003ca name=\"Context.Message\"\u003e\u003c/a\u003e\n### func \\(\\*Context\\) Message\n\n```go\nfunc (c *Context) Message() *tg.Message\n```\n\nMessage returns the current message.\n\n\u003ca name=\"Context.MessageID\"\u003e\u003c/a\u003e\n### func \\(\\*Context\\) MessageID\n\n```go\nfunc (c *Context) MessageID() int\n```\n\nMessageID returns the message ID.\n\n\u003ca name=\"Context.Messages\"\u003e\u003c/a\u003e\n### func \\(\\*Context\\) Messages\n\n```go\nfunc (c *Context) Messages() []*tg.Message\n```\n\nMessages returns all messages \\(for albums, otherwise single message\\).\n\n\u003ca name=\"Context.Param\"\u003e\u003c/a\u003e\n### func \\(\\*Context\\) Param\n\n```go\nfunc (c *Context) Param(key string) any\n```\n\nParam returns a single parameter value.\n\n\u003ca name=\"Context.Params\"\u003e\u003c/a\u003e\n### func \\(\\*Context\\) Params\n\n```go\nfunc (c *Context) Params() ParsedParams\n```\n\nParams returns the parsed command parameters.\n\n\u003ca name=\"Context.Reply\"\u003e\u003c/a\u003e\n### func \\(\\*Context\\) Reply\n\n```go\nfunc (c *Context) Reply(text string) error\n```\n\nReply sends a reply to the current message.\n\n\u003ca name=\"Context.Send\"\u003e\u003c/a\u003e\n### func \\(\\*Context\\) Send\n\n```go\nfunc (c *Context) Send(text string) error\n```\n\nSend sends a message to the current chat.\n\n\u003ca name=\"Context.SendTo\"\u003e\u003c/a\u003e\n### func \\(\\*Context\\) SendTo\n\n```go\nfunc (c *Context) SendTo(userID int64, text string) error\n```\n\nSendTo sends a message to a specific user ID.\n\n\u003ca name=\"Context.SenderID\"\u003e\u003c/a\u003e\n### func \\(\\*Context\\) SenderID\n\n```go\nfunc (c *Context) SenderID() int64\n```\n\nSenderID returns the sender's user ID.\n\n\u003ca name=\"Context.Text\"\u003e\u003c/a\u003e\n### func \\(\\*Context\\) Text\n\n```go\nfunc (c *Context) Text() string\n```\n\nText returns the message text.\n\n\u003ca name=\"Context.Update\"\u003e\u003c/a\u003e\n### func \\(\\*Context\\) Update\n\n```go\nfunc (c *Context) Update() tg.UpdateClass\n```\n\nUpdate returns the raw update.\n\n\u003ca name=\"DeleteContext\"\u003e\u003c/a\u003e\n## type DeleteContext\n\nDeleteContext provides access to deleted message info.\n\n```go\ntype DeleteContext struct {\n    context.Context\n    // contains filtered or unexported fields\n}\n```\n\n\u003ca name=\"DeleteContext.API\"\u003e\u003c/a\u003e\n### func \\(\\*DeleteContext\\) API\n\n```go\nfunc (c *DeleteContext) API() *tg.Client\n```\n\nAPI returns the raw tg.Client for advanced operations.\n\n\u003ca name=\"DeleteContext.ChannelID\"\u003e\u003c/a\u003e\n### func \\(\\*DeleteContext\\) ChannelID\n\n```go\nfunc (c *DeleteContext) ChannelID() int64\n```\n\nChannelID returns the channel ID \\(for channel deletes\\).\n\n\u003ca name=\"DeleteContext.ChatID\"\u003e\u003c/a\u003e\n### func \\(\\*DeleteContext\\) ChatID\n\n```go\nfunc (c *DeleteContext) ChatID() int64\n```\n\nChatID returns the chat ID \\(for non\\-channel deletes\\).\n\n\u003ca name=\"DeleteContext.MessageIDs\"\u003e\u003c/a\u003e\n### func \\(\\*DeleteContext\\) MessageIDs\n\n```go\nfunc (c *DeleteContext) MessageIDs() []int\n```\n\nMessageIDs returns the IDs of deleted messages.\n\n\u003ca name=\"DeleteFilter\"\u003e\u003c/a\u003e\n## type DeleteFilter\n\nDeleteFilter defines conditions for delete handlers.\n\n```go\ntype DeleteFilter struct {\n    // Chats filters by chat IDs.\n    Chats []int64\n\n    // Custom is a custom filter function.\n    Custom func(ctx *DeleteContext) bool\n}\n```\n\n\u003ca name=\"DeleteFunc\"\u003e\u003c/a\u003e\n## type DeleteFunc\n\nDeleteFunc is the function signature for deleted message handlers.\n\n```go\ntype DeleteFunc func(ctx *DeleteContext) error\n```\n\n\u003ca name=\"Filter\"\u003e\u003c/a\u003e\n## type Filter\n\nFilter defines conditions for when a handler should be invoked.\n\n```go\ntype Filter struct {\n    // Chats filters by chat IDs (channels, groups, users).\n    // Empty means all chats.\n    Chats []int64\n\n    // Users filters by user IDs.\n    // Empty means all users.\n    Users []int64\n\n    // Incoming filters for incoming messages only.\n    Incoming bool\n\n    // Outgoing filters for outgoing messages only.\n    Outgoing bool\n\n    // Custom is a custom filter function.\n    // Return true to process the message, false to skip.\n    Custom func(ctx *Context) bool\n}\n```\n\n\u003ca name=\"HandlerFunc\"\u003e\u003c/a\u003e\n## type HandlerFunc\n\nHandlerFunc is the function signature for event handlers.\n\n```go\ntype HandlerFunc func(ctx *Context) error\n```\n\n\u003ca name=\"Options\"\u003e\u003c/a\u003e\n## type Options\n\nOptions configures optional behavior of EntitiesToHTML.\n\n```go\ntype Options struct {\n    // HashtagHref returns href for a hashtag. tag is the keyword without \"#\". \"\" -\u003e \u003cstrong\u003e; nil -\u003e tg://hashtag?q=\u003ctag\u003e.\n    HashtagHref func(tag string) string\n}\n```\n\n\u003ca name=\"ParamSchema\"\u003e\u003c/a\u003e\n## type ParamSchema\n\nParamSchema defines validation rules for a command parameter.\n\n```go\ntype ParamSchema struct {\n    // Type is the parameter type (string, int, bool, enum).\n    Type ParamType\n\n    Required bool\n\n    Default any\n\n    Enum []string\n\n    Description string\n}\n```\n\n\u003ca name=\"ParamType\"\u003e\u003c/a\u003e\n## type ParamType\n\nParamType defines the type of a command parameter.\n\n```go\ntype ParamType string\n```\n\n\u003ca name=\"TypeString\"\u003e\u003c/a\u003e\n\n```go\nconst (\n    TypeString ParamType = \"string\"\n    TypeInt    ParamType = \"int\"\n    TypeBool   ParamType = \"bool\"\n    TypeEnum   ParamType = \"enum\"\n)\n```\n\n\u003ca name=\"Params\"\u003e\u003c/a\u003e\n## type Params\n\nParams is a map of parameter names to their schemas.\n\n```go\ntype Params map[string]ParamSchema\n```\n\n\u003ca name=\"ParsedParams\"\u003e\u003c/a\u003e\n## type ParsedParams\n\nParsedParams holds validated parameter values.\n\n```go\ntype ParsedParams map[string]any\n```\n\n\u003ca name=\"ParsedParams.Bool\"\u003e\u003c/a\u003e\n### func \\(ParsedParams\\) Bool\n\n```go\nfunc (p ParsedParams) Bool(key string) bool\n```\n\nBool returns the bool value of a parameter.\n\n\u003ca name=\"ParsedParams.Has\"\u003e\u003c/a\u003e\n### func \\(ParsedParams\\) Has\n\n```go\nfunc (p ParsedParams) Has(key string) bool\n```\n\nHas returns true if the parameter was provided.\n\n\u003ca name=\"ParsedParams.Int\"\u003e\u003c/a\u003e\n### func \\(ParsedParams\\) Int\n\n```go\nfunc (p ParsedParams) Int(key string) int64\n```\n\nInt returns the int64 value of a parameter.\n\n\u003ca name=\"ParsedParams.String\"\u003e\u003c/a\u003e\n### func \\(ParsedParams\\) String\n\n```go\nfunc (p ParsedParams) String(key string) string\n```\n\nString returns the string value of a parameter.\n\n\u003ca name=\"ScopeAllGroupAdmins\"\u003e\u003c/a\u003e\n## type ScopeAllGroupAdmins\n\nScopeAllGroupAdmins makes the command available to all group admins.\n\n```go\ntype ScopeAllGroupAdmins struct{}\n```\n\n\u003ca name=\"ScopeAllGroups\"\u003e\u003c/a\u003e\n## type ScopeAllGroups\n\nScopeAllGroups makes the command available in all group chats.\n\n```go\ntype ScopeAllGroups struct{}\n```\n\n\u003ca name=\"ScopeAllPrivate\"\u003e\u003c/a\u003e\n## type ScopeAllPrivate\n\nScopeAllPrivate makes the command available in all private chats.\n\n```go\ntype ScopeAllPrivate struct{}\n```\n\n\u003ca name=\"ScopeChannel\"\u003e\u003c/a\u003e\n## type ScopeChannel\n\nScopeChannel makes the command available in a specific channel/supergroup. The bot must be an admin in the channel. Use ScopeChannelUsername if you only have the username.\n\n```go\ntype ScopeChannel struct {\n    ChannelID  int64\n    AccessHash int64\n}\n```\n\n\u003ca name=\"ScopeChannelAdmins\"\u003e\u003c/a\u003e\n## type ScopeChannelAdmins\n\nScopeChannelAdmins makes the command available to admins in a specific channel/supergroup.\n\n```go\ntype ScopeChannelAdmins struct {\n    ChannelID  int64\n    AccessHash int64\n}\n```\n\n\u003ca name=\"ScopeChannelUsername\"\u003e\u003c/a\u003e\n## type ScopeChannelUsername\n\nScopeChannelUsername makes the command available in a channel by username. The username is resolved to channel ID and access hash at sync time.\n\n```go\ntype ScopeChannelUsername struct {\n    Username string // Without @ prefix\n}\n```\n\n\u003ca name=\"ScopeChat\"\u003e\u003c/a\u003e\n## type ScopeChat\n\nScopeChat makes the command available in a specific basic group. For supergroups/channels, use ScopeChannel.\n\n```go\ntype ScopeChat struct {\n    ChatID int64\n}\n```\n\n\u003ca name=\"ScopeChatAdmins\"\u003e\u003c/a\u003e\n## type ScopeChatAdmins\n\nScopeChatAdmins makes the command available to admins in a specific basic group. For supergroups/channels, use ScopeChannelAdmins.\n\n```go\ntype ScopeChatAdmins struct {\n    ChatID int64\n}\n```\n\n\u003ca name=\"ScopeChatMember\"\u003e\u003c/a\u003e\n## type ScopeChatMember\n\nScopeChatMember makes the command available to a specific user in a basic group chat. For supergroups, use ScopeChatMemberChannel.\n\n```go\ntype ScopeChatMember struct {\n    ChatID         int64\n    UserID         int64\n    UserAccessHash int64\n}\n```\n\n\u003ca name=\"ScopeChatMemberChannel\"\u003e\u003c/a\u003e\n## type ScopeChatMemberChannel\n\nScopeChatMemberChannel makes the command available to a specific user in a channel/supergroup.\n\n```go\ntype ScopeChatMemberChannel struct {\n    ChannelID         int64\n    ChannelAccessHash int64\n    UserID            int64\n    UserAccessHash    int64\n}\n```\n\n\u003ca name=\"ScopeDefault\"\u003e\u003c/a\u003e\n## type ScopeDefault\n\nScopeDefault makes the command available in all private chats.\n\n```go\ntype ScopeDefault struct{}\n```\n\n\u003ca name=\"ScopeUser\"\u003e\u003c/a\u003e\n## type ScopeUser\n\nScopeUser makes the command available to a specific user in private chat. Use ScopeUsername if you only have the username.\n\n```go\ntype ScopeUser struct {\n    UserID     int64\n    AccessHash int64\n}\n```\n\n\u003ca name=\"ScopeUsername\"\u003e\u003c/a\u003e\n## type ScopeUsername\n\nScopeUsername makes the command available to a user by username. The username is resolved to user ID and access hash at sync time.\n\n```go\ntype ScopeUsername struct {\n    Username string // Without @ prefix\n}\n```\n\n\u003ca name=\"UserInfo\"\u003e\u003c/a\u003e\n## type UserInfo\n\nUserInfo contains resolved user information.\n\n```go\ntype UserInfo struct {\n    ID         int64\n    AccessHash int64\n    Username   string\n}\n```\n\nGenerated by [gomarkdoc](\u003chttps://github.com/princjef/gomarkdoc\u003e)\n\n\n\u003c!-- gomarkdoc:embed:end --\u003e\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fen9inerd%2Ftelekit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fen9inerd%2Ftelekit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fen9inerd%2Ftelekit/lists"}