{"id":20701852,"url":"https://github.com/michyaraque/simpletelegrambot","last_synced_at":"2026-05-29T12:01:49.694Z","repository":{"id":62528300,"uuid":"432369684","full_name":"michyaraque/SimpleTelegramBot","owner":"michyaraque","description":"PHP Simple Telegram bot with components routes and easy stepper functionality","archived":false,"fork":false,"pushed_at":"2021-11-29T03:19:02.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T04:19:35.223Z","etag":null,"topics":["bots","php","telegram"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/michyaraque.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":"2021-11-27T04:43:23.000Z","updated_at":"2021-12-22T11:31:26.000Z","dependencies_parsed_at":"2022-11-02T14:30:54.781Z","dependency_job_id":null,"html_url":"https://github.com/michyaraque/SimpleTelegramBot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/michyaraque/SimpleTelegramBot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michyaraque%2FSimpleTelegramBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michyaraque%2FSimpleTelegramBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michyaraque%2FSimpleTelegramBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michyaraque%2FSimpleTelegramBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michyaraque","download_url":"https://codeload.github.com/michyaraque/SimpleTelegramBot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michyaraque%2FSimpleTelegramBot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33650712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"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":["bots","php","telegram"],"created_at":"2024-11-17T00:43:22.015Z","updated_at":"2026-05-29T12:01:49.673Z","avatar_url":"https://github.com/michyaraque.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Componetized Telegram BOT\n\nImagine being able to create a bot with a few steps and each menu or function as if it were a method of a class. I have developed this tool to make it easier to create bots that require interaction between several screens.\n\n# Project overview\n### Prerequisites\n```\n- PHP \u003e= 7.4\n- Redis\n- Mysql Mariadb\n- Domain with SSL\n```\n### Features\n- Components inside another components\n- Easy component creation\n- Easy step proccess\n\n### How to use Components\nIn the event Events folder you can create a bunch of different loader or separated bots.\n\nEvents Folder Structure\n```bash\nEvents\n   └── example\n       ├── main.php\n       └── __query_helpers.php\n```\n\nTo load this structure folder you have to define in the public folder\n```php\n$events = new EventLoader(Updates::userId(), Updates::language());\n$events-\u003esetPath('example');\n$events-\u003eforceEvents(['main.php', '__query_helpers.php']);\n$events-\u003egetEvents();\n```\n\nIn main.php you have to declare the Components route like this\n```php\nComponent::group('Example', function ($component) {\n    $component-\u003einclude('initialPanels')-\u003eget([\n        'start' =\u003e ['commands' =\u003e ['start', 'cancel']],\n    ])-\u003einit();\n});\n```\n- `start` refers to the static function inside the `initialPanels` folder that is inside the `Example` path\n- `initialPanels` has to be named as `InitialPanelsComponent.php` \n\nThe folder structure of the components is as follows and you can add as many as you like\n```bash\nComponents\n   ├── Example\n   │   └── InitialPanelsComponent.php\n   └── Component.php\n```\n\n### initialPanelsComponent.php overview\n```php\n\u003c?php\n\nnamespace App\\Components\\Example;\n\nuse App\\Models\\Data;\nuse App\\Components\\Component;\nuse Telegram\\{Client, Updates};\n\nclass InitialPanelsComponent extends Component {\n\n    public static function start() {\n        Client::sendMessage(Updates::userId(), \"Example message\");\n    }\n\n}\n```\n\n### How to \u003e Telegram functions\nTelegram updates are loaded globally in the Updates class, which you can use anywhere in static form\n\nSimple sendMessage with inline keyboard\n```php\n$inline_keyboard = new InlineKeyboard;\n$inline_keyboard-\u003einlineKeyboardButton('Button name', 'callback_identifier');\n$inline_keyboard-\u003eendRow();\n\nClient::sendMessage(Updates::userId(), \"Example message\", [\n    'reply_markup' =\u003e $inline_keyboard-\u003einlineKeyboardMarkup()\n]);\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichyaraque%2Fsimpletelegrambot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichyaraque%2Fsimpletelegrambot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichyaraque%2Fsimpletelegrambot/lists"}