PHPackages                             itpekov/telegram-message - 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. itpekov/telegram-message

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

itpekov/telegram-message
========================

Send message to Telegram channel via bot

1.0.2(1y ago)017MITPHPPHP ^8.1

Since May 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/itpekov/telegram-message)[ Packagist](https://packagist.org/packages/itpekov/telegram-message)[ RSS](/packages/itpekov-telegram-message/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (7)Versions (4)Used By (0)

Telegram message
================

[](#telegram-message)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e32238005143a1cabd3b93a5917e17c2434cc22765f4e4d1e659e16cfcba51d6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f697470656b6f762f74656c656772616d2d6d6573736167652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/itpekov/telegram-message)[![GitHub Tests Action Status](https://camo.githubusercontent.com/5761441c18e8b051d900067b7537fbeb5d70d047bd3e1b90fa90d5158ff6628a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f697470656b6f762f74656c656772616d2d6d6573736167652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/itpekov/telegram-message/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/412b39ec505a45579e148df62039ccee7f9cafc1e518d23f86432bcd5850b686/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f697470656b6f762f74656c656772616d2d6d6573736167652f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/itpekov/telegram-message/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)

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

[](#installation)

You can install the package via composer:

```
composer require itpekov/telegram-message
```

Add in `.env` file variables:

```
TELEGRAM_CHAT_ID=your_chat_id
TELEGRAM_BOT_TOKEN=your_bot_token
```

Usage
-----

[](#usage)

Scenario 1: send message from any place with:

```
Telegram::sendMessage('Your message');
```

Scenario 2: send exception messages with

```
Telegram::sendExceptionMessage($e);
```

Scenario 3: send all unhandled exceptions from your app by adding/updating `report` method in `Handler.php` class

```
use Itpekov\TelegramMessage\Facades\Telegram;

public function report(Throwable $e)
{
    $e = $this->mapException($e);

    if ($this->shouldntReport($e)) {
        return;
    }

    Telegram::sendExceptionMessage($e);

    $this->reportThrowable($e);
}
```

Customization
-------------

[](#customization)

Optionally, You can publish the config file with:

```
php artisan vendor:publish --provider="Itpekov\TelegramMessage\TelegramMessageServiceProvider" --tag="config"
```

This is the contents of the published config file:

```
return [
    'chat_id' => env('TELEGRAM_CHAT_ID'),
    'bot_token' => env('TELEGRAM_BOT_TOKEN'),
];
```

Optionally, you can publish the views using

```
php artisan vendor:publish --provider="Itpekov\TelegramMessage\TelegramMessageServiceProvider" --tag="views"
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [itpekov](https://github.com/itpekov)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.7% 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

Every ~6 days

Total

2

Last Release

722d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cf32f86884eadd465d3485b54eef2bbc65b6934dc2e4ef71001c23026ba93070?d=identicon)[itpekov](/maintainers/itpekov)

---

Top Contributors

[![itpekov](https://avatars.githubusercontent.com/u/36026935?v=4)](https://github.com/itpekov "itpekov (13 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

telegramtelegram bottelegram bot apitelegram phplaravel telegramtelegram message

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/itpekov-telegram-message/health.svg)

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

###  Alternatives

[irazasyed/telegram-bot-sdk

The Unofficial Telegram Bot API PHP SDK

3.3k4.5M84](/packages/irazasyed-telegram-bot-sdk)[telegram-bot-sdk/telegram-bot-sdk

The Telegram Bot API PHP SDK

32480.5k](/packages/telegram-bot-sdk-telegram-bot-sdk)[exileed/telegram-bot-api

The Telegram Bot API PHP

1514.1k](/packages/exileed-telegram-bot-api)

PHPackages © 2026

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