PHPackages                             blaze/blazing - 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. [API Development](/categories/api)
4. /
5. blaze/blazing

Abandoned → [blaze/myst](/?search=blaze%2Fmyst)Library[API Development](/categories/api)

blaze/blazing
=============

PHP Telegram Bot SDK

0227PHP

Since Nov 22Pushed 8y agoCompare

[ Source](https://github.com/BlazeMV/Blazing)[ Packagist](https://packagist.org/packages/blaze/blazing)[ RSS](/packages/blaze-blazing/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Blazing
=======

[](#blazing)

Telegram bot php SDK
--------------------

[](#telegram-bot-php-sdk)

- Installing

    - [Install php](http://php.net/manual/en/install.php) (7.0 or higher recommend)
    - [Install composer](https://getcomposer.org/doc/00-intro.md)
- Create a new project

    - In terminal (cmd) run `composer create-project blaze/blazingsdk `
    - Wait till all dependencies are installed
- Create a new Bot

    - Go to project folder ( `cd ` )
    - `composer new bot  `
    - A new folder with the bot name inside project folder should be created now.
- (optional) using laravel’s database module (eloquent) with bots

    - Refer to [How to use eloquent outside laravel](https://laracasts.com/lessons/how-to-use-eloquent-outside-of-laravel)
    - An easier was to use eloquent is planned for future.
- At this point bot will be already configured to respond to /start and /help commands with some default response. You can edit these response from `commands.php` file inside your bot's directory
- To add support for more commands add a new method to Commands class (`commands.php` file). The method should be static (will be changed later) and method name should be the first word of the command. The method should also accept 2 arguments a bot object and a message object.

    - Eg: if you are adding support for `/hello` command your method should look like

        - `public static function hello(Bot $bot, Message $msg) {  }`
    - Note a command doesn't necessarily have to be in the beginning of a msg to be sent to `commands.php`. you can change this from `updates.php`
- If you want bot to respond to CallBackQueries you have add a method to CallBackQueries class (`CallBackQueries.php` file). The method should be static and its name should be the first word of callback query’s data. The method should also accept 2 arguments, a bot object and a CallBackQuery object.

    - Eg: if you are adding support for a call back query with first word of data as 'hello' your method should look like

        - `public static function hello(Bot $bot, CallBackQuery $cbq) {  }`
    - You can also edit `updates.php` file to customize the way you want to handle commands, CallBackQueries and other types of bot update objects.
- For the telegram api objects (Message, chat user etc…) use `get` before api method as getters.

    - Eg: to get message id, use `$msg->getMessageId()`
    - Case sentivity and underscores doesn't matter.
- To send requests to telegram api use sendRequest() method in bot class. This method accepts an array. The array must contain a method key and other parameters for the specified method.

    - Eg: `$bot->sendRequest (array( “method” => “sendMessage”, “chat_id” => $msg->getChat()->getId(), “text” => “some text” ));`

##### If you need any further assistance please do not hesitate to contact me (@BlazeMV) on telegram.

[](#if-you-need-any-further-assistance-please-do-not-hesitate-to-contact-me-blazemv-on-telegram)

###### Developed with php by Adam Dawood (@BlazeMV)

[](#developed-with-php--by-adam-dawood-blazemv)

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e04e5f38c233536e427a03689ae0fe7c2ee569231b028c13e6858c3e07c6387?d=identicon)[Blaze](/maintainers/Blaze)

---

Top Contributors

[![BlazeMV](https://avatars.githubusercontent.com/u/24711991?v=4)](https://github.com/BlazeMV "BlazeMV (50 commits)")

### Embed Badge

![Health badge](/badges/blaze-blazing/health.svg)

```
[![Health](https://phpackages.com/badges/blaze-blazing/health.svg)](https://phpackages.com/packages/blaze-blazing)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M19](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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