{"id":19112923,"url":"https://github.com/chipslays/php-telegram-userbot","last_synced_at":"2026-06-01T16:30:15.960Z","repository":{"id":203453913,"uuid":"320627946","full_name":"chipslays/php-telegram-userbot","owner":"chipslays","description":"🧟‍♂️ A Simple PHP Telegram Userbot based on components.","archived":false,"fork":false,"pushed_at":"2021-09-05T09:48:47.000Z","size":34,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-03T04:52:42.027Z","etag":null,"topics":["madelineproto","php","telegram","userbot","userbot-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/chipslays.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-11T16:34:16.000Z","updated_at":"2023-10-25T04:25:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"54247ed7-3800-4218-9e94-ee9e8b1563e0","html_url":"https://github.com/chipslays/php-telegram-userbot","commit_stats":null,"previous_names":["chipslays/php-telegram-userbot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chipslays%2Fphp-telegram-userbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chipslays%2Fphp-telegram-userbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chipslays%2Fphp-telegram-userbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chipslays%2Fphp-telegram-userbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chipslays","download_url":"https://codeload.github.com/chipslays/php-telegram-userbot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240170056,"owners_count":19759141,"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":["madelineproto","php","telegram","userbot","userbot-telegram"],"created_at":"2024-11-09T04:34:33.833Z","updated_at":"2026-06-01T16:30:15.840Z","avatar_url":"https://github.com/chipslays.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⚠ Abandoned project\n\n## Moved to: [telegram-client](https://github.com/chipslays/telegram-client)\n\n# PHP Telegram Userbot\n\n\n\nPHP Telegram userbot based on [MadelineProto](https://docs.madelineproto.xyz/) library.\n\n# Install\n**1.** Clone this repository:\n```bash\ngit clone https://github.com/chipslays/php-telegram-userbot.git userbot\n```\n\n**2.** Go to downloaded folder:\n```bash\ncd userbot\n```\n\n**3.** Rename `settings.php.example` to `settings.php`. \n\nSee more info about settings [here](https://docs.madelineproto.xyz/docs/SETTINGS.html).\n```bash\ncp settings.php.example settings.php\n```\n\n**4.** In `settings.php` you can may change `api_id` and `api_hash` (optional).\n```\n...\n'app_info' =\u003e [\n    'api_id' =\u003e 'YOUR_API_ID',\n    'api_hash' =\u003e 'YOUR_API_HASH',\n],\n...\n```\n\n**5.** Run userbot:\n```bash\nphp userbot.php\n```\n\nNow, you need to go through authorization. \n\nThe first time authorization will take a long time, but the next times it will be faster.\n\nSee [MadelineProto](https://docs.madelineproto.xyz/) docs [here](https://docs.madelineproto.xyz/).\n\n# Components\nAll your code should be in the `components` folder.\n\nEvery time a new `$update` arrives, all components are loaded anew. \n\nThat is, you can launch the userbot once and change the component code on the fly without fear of errors that the userbot will crash.\n\nFor example, you can see `ping` component [here](https://github.com/chipslays/php-telegram-userbot/tree/master/components/ping).\n\n### Create new component\n\nFirst, create new folder for your component:\n```bash\nmkdir components/helloworld\n```\n\nCreate entrypoint file `component.php` in `components/helloworld` folder:\n```bash\ntouch components/helloworld/component.php\n```\n\nNow, create component logic:\n```php\n\u003c?php \n\n/**\n * @var danog\\MadelineProto\\API $bot MadelineProto API Instance\n * @var array $update Array of come Update\n * @var string|null $message Text of come message\n * @var array $me Info about your profile\n * @var int|null $userId Interlocutor (chat, etc.)\n * @var int|null $fromId Where is it sent from\n */\n\nif ($message == '.helloworld' \u0026\u0026 $me['id'] == $fromId) {\n    edit('\u003cb\u003eHello World!\u003c/b\u003e');\n}\n```\n\nNow, we can send a message with the text `.helloworld`, and it will be automatically edited to contain `Hello World!`.\n\n\u003e **NOTE:** After editing or creating a new component, it is **not necessary** to restart the userbot.\n\n# Helpers\n\n\u003e **NOTE:** You can pass any method params in `$extra`.\n\n`send($text, [$extra = []])` - short alias for `$bot-\u003emessages-\u003esendMessage()`.\n\n`reply($text, [$extra = []])` - reply to incoming message.\n\n`edit($text, [$extra = []])` - short alias for `$bot-\u003emessages-\u003eeditMessage()`.\n\n`sendMedia($media, [$text = null, $extra = []])` - short alias for `$bot-\u003emessages-\u003esendMedia`.\n\n`replyMedia($media, [$text = null, $extra = []])` - reply with file to incoming message.\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchipslays%2Fphp-telegram-userbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchipslays%2Fphp-telegram-userbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchipslays%2Fphp-telegram-userbot/lists"}