{"id":37905387,"url":"https://github.com/vitaliy-ukiru/fsm-telebot","last_synced_at":"2026-01-16T17:10:08.304Z","repository":{"id":57661807,"uuid":"477146974","full_name":"vitaliy-ukiru/fsm-telebot","owner":"vitaliy-ukiru","description":"Finite State Machine for Go telebot","archived":false,"fork":false,"pushed_at":"2025-04-04T09:08:30.000Z","size":331,"stargazers_count":36,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"v2.x","last_synced_at":"2025-04-04T09:32:51.729Z","etag":null,"topics":["fsm","fsm-telegram","go-fsm","go-fsm-telegram","go-telebot","state-management","telebot","telegram-bot-api"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/vitaliy-ukiru/fsm-telebot/v2","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/vitaliy-ukiru.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-02T19:04:20.000Z","updated_at":"2025-04-04T09:04:40.000Z","dependencies_parsed_at":"2024-03-23T21:23:32.103Z","dependency_job_id":"a38624fd-7c93-4049-8324-ff608e1ee013","html_url":"https://github.com/vitaliy-ukiru/fsm-telebot","commit_stats":{"total_commits":319,"total_committers":4,"mean_commits":79.75,"dds":"0.043887147335423204","last_synced_commit":"f82e16dd613d960daa3753c1a3a4af7899a2ab91"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/vitaliy-ukiru/fsm-telebot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitaliy-ukiru%2Ffsm-telebot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitaliy-ukiru%2Ffsm-telebot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitaliy-ukiru%2Ffsm-telebot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitaliy-ukiru%2Ffsm-telebot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vitaliy-ukiru","download_url":"https://codeload.github.com/vitaliy-ukiru/fsm-telebot/tar.gz/refs/heads/v2.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitaliy-ukiru%2Ffsm-telebot/sbom","scorecard":{"id":923992,"data":{"date":"2025-08-11","repo":{"name":"github.com/vitaliy-ukiru/fsm-telebot","commit":"7dc72d68f032915a1badee4ca014ab09c206de06"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/6 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Security-Policy","score":4,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Warn: no linked content found","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/golangci-lint.yml:12","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/vitaliy-ukiru/fsm-telebot/go.yml/v2.x?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/vitaliy-ukiru/fsm-telebot/go.yml/v2.x?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/vitaliy-ukiru/fsm-telebot/golangci-lint.yml/v2.x?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/vitaliy-ukiru/fsm-telebot/golangci-lint.yml/v2.x?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/vitaliy-ukiru/fsm-telebot/golangci-lint.yml/v2.x?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":1,"reason":"SAST tool is not run on all commits -- score normalized to 1","details":["Warn: 3 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-25T08:49:20.508Z","repository_id":57661807,"created_at":"2025-08-25T08:49:20.508Z","updated_at":"2025-08-25T08:49:20.508Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["fsm","fsm-telegram","go-fsm","go-fsm-telegram","go-telebot","state-management","telebot","telegram-bot-api"],"created_at":"2026-01-16T17:10:07.612Z","updated_at":"2026-01-16T17:10:08.300Z","avatar_url":"https://github.com/vitaliy-ukiru.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fsm-telebot\n\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/vitaliy-ukiru/fsm-telebot/v2.x?style=flat-square)\n[![Go Reference](https://pkg.go.dev/badge/github.com/vitaliy-ukiru/fsm-telebot/v2.svg)](https://pkg.go.dev/github.com/vitaliy-ukiru/fsm-telebot/v2)\n[![Go](https://github.com/vitaliy-ukiru/fsm-telebot/actions/workflows/go.yml/badge.svg?branch=master\u0026style=flat-square)](https://github.com/vitaliy-ukiru/fsm-telebot/actions/workflows/go.yml)\n[![golangci-lint](https://github.com/vitaliy-ukiru/fsm-telebot/actions/workflows/golangci-lint.yml/badge.svg?branch=master)](https://github.com/vitaliy-ukiru/fsm-telebot/actions/workflows/golangci-lint.yml)\n\n\u003c!-- TOC --\u003e\n* [fsm-telebot](#fsm-telebot)\n* [Overview](#overview)\n* [Install](#install)\n* [Quick Start](#quick-start)\n  * [Create telebot.Bot instance](#create-telebotbot-instance)\n  * [Optionally create group (recommended)](#optionally-create-group-recommended)\n  * [Init FSM manager](#init-fsm-manager)\n    * [List of settings](#list-of-settings)\n  * [Optionally setup middleware for context](#optionally-setup-middleware-for-context)\n  * [Bind handler via telebot-filter](#bind-handler-via-telebot-filter)\n    * [telebot-filter/dispatcher](#telebot-filterdispatcher)\n      * [Init dispatcher](#init-dispatcher)\n      * [Setups handlers](#setups-handlers)\n    * [telebot-filter/routing](#telebot-filterrouting)\n* [Examples](#examples)\n* [Storages](#storages)\n  * [Memory storage](#memory-storage)\n    * [Path:](#path-)\n  * [Redis storage](#redis-storage)\n    * [Install](#install-1)\n  * [Add your implementation to list](#add-your-implementation-to-list)\n\u003c!-- TOC --\u003e\n\n# Overview\nFinite State Machine for [telebot](https://gopkg.in/telebot.v4). \nBased on [aiogram](https://github.com/aiogram/aiogram) FSM version.\n\nIt not a full implementation FSM. It just states manager for telegram bots.\n\n\u003e [!IMPORTANT]\n\u003e \n\u003e Since v2.0.0-beta.2 supports only telebot@v4 and above\n\u003e \n\u003e Support for telebot@v3 will be dropped.\n\nThis module build over \n[github.com/vitaliy-ukiru/telebot-filter](https://pkg.go.dev/github.com/vitaliy-ukiru/telebot-filter).\n\n\n\n\n# Install\n```\ngo get github.com/vitaliy-ukiru/fsm-telebot/v2\n```\n\n# Quick Start\n## Create telebot.Bot instance\n```go\nbot, err := tele.NewBot(tele.Settings{\n\t\tToken:   os.Getenv(\"BOT_TOKEN\"),\n\t\tPoller:  \u0026tele.LongPoller{Timeout: 10 * time.Second},\n\t\tVerbose: *debug,\n})\n```\n\n## Optionally create group (recommended)\n```go\ng = bot.Group()\n```\n\n## Init FSM manager\n```\nm := fsm.New(memory.NewStorage())\n```\n\u003e [!TIP]\n\u003e \n\u003e Also, you can add optional settings. \n\u003e See [fsmopt/manager.go](./fsmopt/manager.go)\n\n### List of settings\n- fsmopt.Strategy - Setup custom strategy for user's targeting in storage\n- fsmopt.ContextFactory - Setup custom FSM context factory\n- fsmopt.FilterProcessor - Setup custom state filter processor\n\n## Optionally setup middleware for context\nThis middleware needs only for cache fsm.Context \nobject in telebot.Context.\n\n```\ng.Use(m.WrapContext)\n```\n\n## Bind handler via telebot-filter\nYou can use any flow of telebot-filter\n\n\n### telebot-filter/dispatcher\n#### Init dispatcher\n```go\ndp := dispatcher.NewDispatcher(g)\n```\nOptionally you can add router object from dispatcher.\n\n#### Setups handlers\nThese methods work and with router object.\n```go\ndp.Dispatch(\n    m.New(\n\t\t// List of options for fsm.HandlerConfig\n        //  in fsmopt/handler.go\n\t\t...,\n    ),\n)\n\nm.Bind(\n    dp,\n    // List of options for fsm.HandlerConfig\n    //  in fsmopt/handler.go\n    ...,\n)\n\n\nm.Handle(\n    dp,\n    tele.OnText, // endpoint\n    MyState,     // state filter as fsm.StateMatcher \n    handler,     // handler as fsm.Handler\n)\n```\n### telebot-filter/routing\nWith this flow available only Manager.New\n\n\u003e [!NOTE]\n\u003e \n\u003e You don't need to pass endpoint option.\n\u003e Because routing package don't look on that.\n\n```\nbot.Handle(\"/start\", \n    routing.New(\n        // don't specify the endpoint because it doesn't count.\n        m.New(\n            ...\n        ),\n\n        m.New(\n            ...\n        ),\n    ),\n)\n```\n\n# Examples\nSee examples in directory [examples](./examples).\n\n\n# Storages\nFSM need storage user state and data for user.\n\n## Memory storage\nThis storage distributes with fsm-telebot/v2.\nIt just in-memory storage, that lose data on stop app\n\n### Path: \n```\ngithub.com/vitaliy-ukiru/fsm-telebot/v2/pkg/storage/memory\n```\n\n## Redis storage\nThis storage based on redis in distributes separated.\n\n### Install\n```\ngo get github.com/nacknime-official/fsm-telebot-redis-storage/v3\n```\n\n## Add your implementation to list\nIf you want to add you implementation in this list, \nthen open pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitaliy-ukiru%2Ffsm-telebot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitaliy-ukiru%2Ffsm-telebot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitaliy-ukiru%2Ffsm-telebot/lists"}