{"id":16467291,"url":"https://github.com/glebsky/simple-telegram","last_synced_at":"2026-03-05T22:34:12.613Z","repository":{"id":47622135,"uuid":"398185849","full_name":"Glebsky/simple-telegram","owner":"Glebsky","description":"Simple Service to work with sending messages,photos,audios via telegram bot","archived":false,"fork":false,"pushed_at":"2024-09-07T09:54:13.000Z","size":17,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-25T11:24:31.723Z","etag":null,"topics":["php","telegram","telegram-bot","telegram-bot-api","telegram-messages"],"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/Glebsky.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,"zenodo":null}},"created_at":"2021-08-20T07:01:03.000Z","updated_at":"2024-09-07T09:54:16.000Z","dependencies_parsed_at":"2025-04-30T01:34:10.707Z","dependency_job_id":"a977fff4-d4e0-4a10-8600-09f3ee45d1b8","html_url":"https://github.com/Glebsky/simple-telegram","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Glebsky/simple-telegram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glebsky%2Fsimple-telegram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glebsky%2Fsimple-telegram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glebsky%2Fsimple-telegram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glebsky%2Fsimple-telegram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Glebsky","download_url":"https://codeload.github.com/Glebsky/simple-telegram/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glebsky%2Fsimple-telegram/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269527567,"owners_count":24432442,"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","status":"online","status_checked_at":"2025-08-09T02:00:10.424Z","response_time":111,"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":["php","telegram","telegram-bot","telegram-bot-api","telegram-messages"],"created_at":"2024-10-11T11:46:51.922Z","updated_at":"2026-03-05T22:34:12.552Z","avatar_url":"https://github.com/Glebsky.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![logo](https://i.ibb.co/Vv58qTS/simple-Telegram.png \"Simple Telegram\")\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://badgen.net/packagist/v/glebsky/simple-telegram\" alt=\"Latest Stable Version\"\u003e\n  \u003cimg src=\"https://badgen.net/packagist/dt/glebsky/simple-telegram\" alt=\"Total Downloads\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/php-%3E%3D7.0-8892bf.svg\" alt=\"PHP\"\u003e\n  \u003ca href=\"https://github.styleci.io/repos/398185849?branch=master\"\u003e\n    \u003cimg src=\"https://github.styleci.io/repos/398185849/shield?branch=master\" alt=\"StyleCI\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    ✉️ 📄 🖼️ 🎧 =\u003e 🤖 =\u003e 😊\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    A simple way to send messages to the user through the telegram bot.\n\u003c/p\u003e\n\n---\n\u003cp align=\"center\"\u003e\n    [\n        \u003ca href=\"https://core.telegram.org/bots/api\"\u003eTelegram Bot Documentation\u003c/a\u003e |\n        \u003ca href=\"https://core.telegram.org/bots/api#sendphoto\"\u003eSupported formats\u003c/a\u003e\n    ]\n\u003c/p\u003e\n\n## About\nThis is a simple class that will allow you to easily send messages, documents, photos, audio to users. The library is specially designed to have fewer dependencies.\n\n## Installation\nThe library can be installed using the composer:\n```bash\nсomposer install glebsky/simple-telegram\n```\nOr you can take a ready-made class from the `src` folder since there are no dependencies.\n## How to use\nAdd in use section:\n```php\nuse Glebsky\\SimpleTelegram\\SimpleTelegram;\n```\nAnd add your SimpleTelegram To your code section to send messages:\n```php\n$botTokent = '132312455234:DSQWDQWQWEZCZXKGWETJHSOASDZXC_s';\n$chat_id = '123456789';\n$telegram = new SimpleTelegram($botTokent,$chat_id);\n\n$telegram-\u003esendMessage('Test Message');\n$telegram-\u003esendDocument(__DIR__.'/demo.txt','Document Caption');\n$telegram-\u003esendPhoto(__DIR__.'/photo.jpg','Photo Caption');\n$telegram-\u003esendAudio(__DIR__.'/audio.mp3','Audio Caption');\n```\n\u003ePlease note that the path to the file must be specified absolute.\n\nYou can change the addressee or get the current addressee (chat_id)\n```php\n$telegram-\u003esetRecipient('123456789');\n$telegram-\u003egetRecipient(); // 123456789\n```\nAlso, you can choose not to specify the receiver when initializing the class; this can be done later before sending.\n```php\n$botTokent = '132312455234:DSQWDQWQWEZCZXKGWETJHSOASDZXC_s';\n$telegram = new SimpleTelegram($botTokent);\n\n$chat_id = '123456789';\n$telegram-\u003esetRecipient($chat_id);\n\n$telegram-\u003esendMessage('Test Message');\n```\nOr you can combine queries\n```php\n$telegram = new SimpleTelegram($botTokent);\n\n$chat_id = '123456789';\n$telegram-\u003esetRecipient($chat_id)-\u003esendPhoto(__DIR__.'/photo.jpg','Photo Caption');\n```\n\nSubmission methods return `true` on successful submission and `false` on failure\n\n```php\n$telegram-\u003esendMessage('Test Message'); // true or false\n$telegram-\u003esendDocument(__DIR__.'/demo.txt','Document Caption'); // true or false\n$telegram-\u003esendPhoto(__DIR__.'/photo.jpg','Photo Caption'); // true or false\n$telegram-\u003esendAudio(__DIR__.'/audio.mp3','Audio Caption'); // true or false\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglebsky%2Fsimple-telegram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglebsky%2Fsimple-telegram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglebsky%2Fsimple-telegram/lists"}