{"id":36252450,"url":"https://github.com/stajor/telegram-bot","last_synced_at":"2026-01-11T07:01:43.296Z","repository":{"id":57058917,"uuid":"137091764","full_name":"Stajor/telegram-bot","owner":"Stajor","description":"PHP Telegram Bot based on the official Telegram Bot API","archived":false,"fork":false,"pushed_at":"2022-03-30T06:23:32.000Z","size":88,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-28T07:10:55.656Z","etag":null,"topics":["php","telegram"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/Stajor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-12T15:28:03.000Z","updated_at":"2023-09-04T18:40:35.000Z","dependencies_parsed_at":"2022-08-24T14:53:24.128Z","dependency_job_id":null,"html_url":"https://github.com/Stajor/telegram-bot","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/Stajor/telegram-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stajor%2Ftelegram-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stajor%2Ftelegram-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stajor%2Ftelegram-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stajor%2Ftelegram-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stajor","download_url":"https://codeload.github.com/Stajor/telegram-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stajor%2Ftelegram-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28296941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T04:44:51.577Z","status":"ssl_error","status_checked_at":"2026-01-11T04:44:44.232Z","response_time":60,"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":["php","telegram"],"created_at":"2026-01-11T07:01:42.952Z","updated_at":"2026-01-11T07:01:43.288Z","avatar_url":"https://github.com/Stajor.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Telgram Bot API\n\nPHP wrapper for [Telegram's Bot API](https://core.telegram.org/bots/api).\n\n![Minimal PHP version](https://img.shields.io/packagist/php-v/stajor/telegram-bot.svg)\n[![Build Status](https://api.travis-ci.org/Stajor/telegram-bot.svg?branch=master)](https://travis-ci.org/Stajor/telegram-bot)\n\n## Installation\n\nAdd this line to your application's composer.json:\n\n```json\n{\n    \"require\": {\n        \"stajor/telegram-bot\": \"^3.0\"\n    }\n}\n```\nand run `composer update`\n\n**Or** run this command in your command line:\n\n    $ composer require stajor/telegram-bot\n    \n## Telegram API support\nAll types and methods of the Telegram Bot API 3.6 are supported.\n\n## Configuration\nFirst of all you need create your own bot and obtain a token\n\n[How do I create a bot?](https://core.telegram.org/bots#3-how-do-i-create-a-bot)\n    \n    \n## Usage\n\nYou can use **Telegram::Bot::Api** standalone\n\n\n```php\n\u003c?php\n\n$api = new \\Telegram\\Bot\\Api('BOT TOKEN');\n$user = $api-\u003egetMe();\n```\n\nOr by using **CommandsHandler** to receive updates from Telegram\n\nCreate command class\n\n```php\n\u003c?php\n\nuse Telegram\\Bot\\Command;\n\nclass StartCommand extends Command {\n    /**\n     * @var string Command Name\n     */\n    protected $name = \"start\";\n\n    /**\n     * @var string Command Description\n     */\n    protected $description = \"Start Command to get you started\";\n\n    /**\n     * @inheritdoc\n     */\n    public function handle() {\n        // This will send a message using `sendMessage`\n        $this-\u003ereplyWithMessage(['text' =\u003e 'Welcome to my Bot']);\n        \n        // Trigger another command dynamically from within this command\n        $this-\u003etriggerCommand('help');\n    }\n}\n```\n\nIn your controller add\n\n```php\n\u003c?php\n       \n$handler = new CommandsHandler('BOT TOKEN');\n$handler-\u003eaddCommand(StartCommand::class);\n$handler-\u003ehandle();\n```\n\n#### Send Photo\n```php\n$api = new \\Telegram\\Bot\\Api('BOT TOKEN');\n$api-\u003esendPhoto(['chat_id' =\u003e 123,'photo' =\u003e fopen('path_to_photo', 'rb')]);\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/Stajor/telegram-bot. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstajor%2Ftelegram-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstajor%2Ftelegram-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstajor%2Ftelegram-bot/lists"}