PHPackages                             glebsky/simple-telegram - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. glebsky/simple-telegram

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

glebsky/simple-telegram
=======================

Just a Simple Telegram class that can help you to send Messages and Files via Telegram Bot

1.0.0(4y ago)361GPL-3.0-onlyPHPPHP &gt;=7.0

Since Aug 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Glebsky/simple-telegram)[ Packagist](https://packagist.org/packages/glebsky/simple-telegram)[ RSS](/packages/glebsky-simple-telegram/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

[![logo](https://camo.githubusercontent.com/bc6d8d5c2ed0dbecbcc958272c8ad1419f22dd9960cb31570f5b38bf4cb6b6c5/68747470733a2f2f692e6962622e636f2f567635387154532f73696d706c652d54656c656772616d2e706e67 "Simple Telegram")](https://camo.githubusercontent.com/bc6d8d5c2ed0dbecbcc958272c8ad1419f22dd9960cb31570f5b38bf4cb6b6c5/68747470733a2f2f692e6962622e636f2f567635387154532f73696d706c652d54656c656772616d2e706e67)

 [![Latest Stable Version](https://camo.githubusercontent.com/aa251b592fdbac20095898c1681d0f9ab7117617a1c182c549b0dfda5e7c5658/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f762f676c6562736b792f73696d706c652d74656c656772616d)](https://camo.githubusercontent.com/aa251b592fdbac20095898c1681d0f9ab7117617a1c182c549b0dfda5e7c5658/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f762f676c6562736b792f73696d706c652d74656c656772616d) [![Total Downloads](https://camo.githubusercontent.com/fd6eddcc5e9a7f881fcdd1ab7001a0243f01665f3ae6a519ae5d9aa1c3ddf8e0/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f64742f676c6562736b792f73696d706c652d74656c656772616d)](https://camo.githubusercontent.com/fd6eddcc5e9a7f881fcdd1ab7001a0243f01665f3ae6a519ae5d9aa1c3ddf8e0/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f64742f676c6562736b792f73696d706c652d74656c656772616d) [![PHP](https://camo.githubusercontent.com/fb080ebe17724e9014c3e29cc917cb01027c0e73d3e05cd78259ecba1b029e59/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344372e302d3838393262662e737667)](https://camo.githubusercontent.com/fb080ebe17724e9014c3e29cc917cb01027c0e73d3e05cd78259ecba1b029e59/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344372e302d3838393262662e737667) [ ![StyleCI](https://camo.githubusercontent.com/4f99b35b388ee6f29345d578ca385eb5dc9a86f83fb3fce5cbd7ad577b77766d/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3339383138353834392f736869656c643f6272616e63683d6d6173746572) ](https://github.styleci.io/repos/398185849?branch=master)

 ✉️ 📄 🖼️ 🎧 =&gt; 🤖 =&gt; 😊

 A simple way to send messages to the user through the telegram bot.

---

 \[ [Telegram Bot Documentation](https://core.telegram.org/bots/api) | [Supported formats](https://core.telegram.org/bots/api#sendphoto) \]

About
-----

[](#about)

This 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.

Installation
------------

[](#installation)

The library can be installed using the composer:

```
сomposer install glebsky/simple-telegram
```

Or you can take a ready-made class from the `src` folder since there are no dependencies.

How to use
----------

[](#how-to-use)

Add in use section:

```
use Glebsky\SimpleTelegram\SimpleTelegram;
```

And add your SimpleTelegram To your code section to send messages:

```
$botTokent = '132312455234:DSQWDQWQWEZCZXKGWETJHSOASDZXC_s';
$chat_id = '123456789';
$telegram = new SimpleTelegram($botTokent,$chat_id);

$telegram->sendMessage('Test Message');
$telegram->sendDocument(__DIR__.'/demo.txt','Document Caption');
$telegram->sendPhoto(__DIR__.'/photo.jpg','Photo Caption');
$telegram->sendAudio(__DIR__.'/audio.mp3','Audio Caption');
```

> Please note that the path to the file must be specified absolute.

You can change the addressee or get the current addressee (chat\_id)

```
$telegram->setRecipient('123456789');
$telegram->getRecipient(); // 123456789
```

Also, you can choose not to specify the receiver when initializing the class; this can be done later before sending.

```
$botTokent = '132312455234:DSQWDQWQWEZCZXKGWETJHSOASDZXC_s';
$telegram = new SimpleTelegram($botTokent);

$chat_id = '123456789';
$telegram->setRecipient($chat_id);

$telegram->sendMessage('Test Message');
```

Or you can combine queries

```
$telegram = new SimpleTelegram($botTokent);

$chat_id = '123456789';
$telegram->setRecipient($chat_id)->sendPhoto(__DIR__.'/photo.jpg','Photo Caption');
```

Submission methods return `true` on successful submission and `false` on failure

```
$telegram->sendMessage('Test Message'); // true or false
$telegram->sendDocument(__DIR__.'/demo.txt','Document Caption'); // true or false
$telegram->sendPhoto(__DIR__.'/photo.jpg','Photo Caption'); // true or false
$telegram->sendAudio(__DIR__.'/audio.mp3','Audio Caption'); // true or false
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1723d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20194253?v=4)[glebsky](/maintainers/glebsky)[@Glebsky](https://github.com/Glebsky)

---

Top Contributors

[![Glebsky](https://avatars.githubusercontent.com/u/20194253?v=4)](https://github.com/Glebsky "Glebsky (15 commits)")

---

Tags

phptelegramtelegram-bottelegram-bot-apitelegram-messages

### Embed Badge

![Health badge](/badges/glebsky-simple-telegram/health.svg)

```
[![Health](https://phpackages.com/badges/glebsky-simple-telegram/health.svg)](https://phpackages.com/packages/glebsky-simple-telegram)
```

###  Alternatives

[laravel-enso/history-tracker

Model history tracking dependency for Laravel Enso

5246.8k5](/packages/laravel-enso-history-tracker)[guywarner/laravel-google-chat-alerts

Send a message to GoogleChat

5333.0k](/packages/guywarner-laravel-google-chat-alerts)[phpu/calendar

中国日历，通过天文计算和民间推算方法，准确计算出公历-1000年至3000年的农历、干支、节气等，同时支持多配置、多语言、多时区。

201.7k](/packages/phpu-calendar)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
