{"id":20618606,"url":"https://github.com/allanchain/command4bot","last_synced_at":"2025-06-25T20:04:13.068Z","repository":{"id":46806481,"uuid":"308186306","full_name":"AllanChain/command4bot","owner":"AllanChain","description":"A general purpose library for command-based iteraction made for bots","archived":false,"fork":false,"pushed_at":"2021-09-24T13:12:44.000Z","size":433,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-06T19:44:31.611Z","etag":null,"topics":["bot","command"],"latest_commit_sha":null,"homepage":"https://command4bot.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AllanChain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-29T01:37:40.000Z","updated_at":"2021-09-05T01:06:19.000Z","dependencies_parsed_at":"2022-09-15T01:34:36.461Z","dependency_job_id":null,"html_url":"https://github.com/AllanChain/command4bot","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/AllanChain/command4bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllanChain%2Fcommand4bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllanChain%2Fcommand4bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllanChain%2Fcommand4bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllanChain%2Fcommand4bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AllanChain","download_url":"https://codeload.github.com/AllanChain/command4bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllanChain%2Fcommand4bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261945357,"owners_count":23234236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","command"],"created_at":"2024-11-16T12:09:01.069Z","updated_at":"2025-06-25T20:04:13.051Z","avatar_url":"https://github.com/AllanChain.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Command For Bot\n\n![PyPI](https://img.shields.io/pypi/v/command4bot)\n![PyPI - Wheel](https://img.shields.io/pypi/wheel/command4bot)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/command4bot)\n\n![Run Tests](https://github.com/AllanChain/command4bot/workflows/Run%20Tests/badge.svg)\n[![codecov](https://codecov.io/gh/AllanChain/command4bot/branch/master/graph/badge.svg?token=RJV7MMZC5D)](https://codecov.io/gh/AllanChain/command4bot)\n\n![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/AllanChain/command4bot)\n![GitHub last commit](https://img.shields.io/github/last-commit/AllanChain/command4bot)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/command4bot)\n\n![Check Code Style](https://github.com/AllanChain/command4bot/workflows/Check%20Code%20Style/badge.svg)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white)](https://github.com/pre-commit/pre-commit)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat\u0026labelColor=ef8336)](https://pycqa.github.io/isort/)\n\n`command4bot` is a general purpose library for command-based iteraction made for bots.\n\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Features](#features)\n- [Documentation](#documentation)\n- [Todo](#todo)\n\n## Installation\n\n```shell\npip install command4bot\n```\n\n## Quick Start\n\n```python\nfrom command4bot import CommandsManager\n\nmgr = CommandsManager()\n\n@mgr.command\ndef greet(payload):\n    return f\"Hello, {payload}!\"\n\nmgr.exec('greet John')  # 'Hello, John!'\n```\n\n## Features\n\n- Register command with a simple decorator\n- Managing command open and closed status with ease\n- Automatically manage command's dependency (a.k.a. `context`) with its status\n- Fallback handlers if no command found\n\n## Documentation\n\n:warning: The documentation is still working in progress!\n\n\u003chttps://command4bot.readthedocs.io/en/latest/\u003e\n\n## Todo\n\n- [ ] Support for commands need interaction\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallanchain%2Fcommand4bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallanchain%2Fcommand4bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallanchain%2Fcommand4bot/lists"}