{"id":19112887,"url":"https://github.com/chipslays/telegram-client","last_synced_at":"2025-07-31T22:41:35.658Z","repository":{"id":62501825,"uuid":"392038423","full_name":"chipslays/telegram-client","owner":"chipslays","description":"🛩 Simple \u0026 scalable PHP wrapper over MadelineProto for easy work with Telegram Client API.","archived":false,"fork":false,"pushed_at":"2022-02-21T12:08:46.000Z","size":17,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-30T22:14:42.599Z","etag":null,"topics":["client-library","telegram","userbot"],"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}},"created_at":"2021-08-02T17:31:43.000Z","updated_at":"2024-07-21T14:19:29.000Z","dependencies_parsed_at":"2022-11-02T12:01:03.911Z","dependency_job_id":null,"html_url":"https://github.com/chipslays/telegram-client","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chipslays%2Ftelegram-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chipslays%2Ftelegram-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chipslays%2Ftelegram-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chipslays%2Ftelegram-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chipslays","download_url":"https://codeload.github.com/chipslays/telegram-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251789618,"owners_count":21644086,"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":["client-library","telegram","userbot"],"created_at":"2024-11-09T04:34:26.285Z","updated_at":"2025-04-30T22:14:47.351Z","avatar_url":"https://github.com/chipslays.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WIP: PHP Telegram Client\n\nSimple \u0026 scalable PHP wrapper over MadelineProto for easy work with Telegram Client API.\n\n\u003e 👷 Work in progress...\n\n# Installation\n\n```bash\ncomposer require chipslays/telegram-client\n```\n\n# Usage\n\nRun this script in terminal like `php client.php`.\n\nThe first time authorization will take a long time, but the next times it will be faster.\n\n\u003e Event system based on [`chipslays/event`](https://github.com/chipslays/event), see this for more cases.\n\n```php\n// client.php\n\nuse Chipslays\\Telegram\\Client;\n\nrequire_once __DIR__ . '/vendor/autoload.php';\n\n$client = new Client([\n    'session' =\u003e 'user.chipslays',\n    'path' =\u003e [\n        'sessions' =\u003e __DIR__ . '/storage/sessions',\n    ],\n    'madeline' =\u003e [\n        'settings' =\u003e [\n            'app_info' =\u003e [\n                'app_id' =\u003e '###',\n                'app_hash' =\u003e '######',\n            ],\n            'logger' =\u003e [\n                'logger_level' =\u003e 0,\n            ],\n        ],\n        'parse_mode' =\u003e 'html',\n    ],\n]);\n\n$result = $client-\u003esendMessage('@chipslays', 'Thank you for PHP MadelineProto wrapper! \u003c3');\n```\n\nSimple userbot.\n\n```php\nuse Chipslays\\Telegram\\Client;\nuse danog\\MadelineProto\\Logger;\n\nrequire_once __DIR__ . '/../vendor/autoload.php';\n\n$client = new Client([\n    'session' =\u003e 'user.chipslays',\n    'path' =\u003e [\n        'sessions' =\u003e __DIR__ . '/storage/sessions',\n    ],\n    'madeline' =\u003e [\n        'settings' =\u003e [\n            'app_info' =\u003e [\n                'app_id' =\u003e '###',\n                'app_hash' =\u003e '######',\n            ],\n            'logger' =\u003e [\n                'logger_level' =\u003e 0,\n            ],\n        ],\n        'parse_mode' =\u003e 'html',\n    ],\n]);\n\n// Catch message where contains \".hello\" and edit this message to \"Hello World!\"\n// See more: https://github.com/chipslays/event\n$client-\u003eon(['message.message' =\u003e '.hello'], function () use ($client) {\n    if (!$client-\u003efromMe()) {\n        return;\n    }\n\n    $client-\u003eedit('Hello World!');\n});\n\n$client-\u003eon(['message.message' =\u003e '.bday {name}'], function ($name) use ($client) {\n    if (!$client-\u003efromMe()) {\n        return;\n    }\n\n    $client-\u003eedit(\"Happy Birthday, {$name}! 🎉🎂\");\n});\n\n// Start polling Telegram updates. \n$client-\u003ehandleUpdates(function ($update) {\n    // This executed on every new update.\n    Logger::log($update-\u003etoArray());\n});\n```\n\nMore soon...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchipslays%2Ftelegram-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchipslays%2Ftelegram-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchipslays%2Ftelegram-client/lists"}