PHPackages                             irwinlopez1023/magma4telegram - 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. irwinlopez1023/magma4telegram

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

irwinlopez1023/magma4telegram
=============================

Magma 4 Telegram

v1.0.2(2mo ago)19MITPHP

Since Apr 11Pushed 2mo agoCompare

[ Source](https://github.com/irwinlopez1023/magma4telegram)[ Packagist](https://packagist.org/packages/irwinlopez1023/magma4telegram)[ RSS](/packages/irwinlopez1023-magma4telegram/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

Magma4Telegram
==============

[](#magma4telegram)

Magma4Telegram is a clean, modular, and intuitive routing framework for Telegram bots based on webhooks. Built for PHP developers who want an elegant way to structure their Telegram bot commands, handle callback queries, abstract away repetitive API calls, seamlessly manage multi-step conversations, and easily dispatch background jobs.

Features
--------

[](#features)

- **Command Routing**: Magma parses incoming webhook requests and routes them to a specific handler class.
- **Magic Arguments Extraction**: Define commands like `/info {name}` and Magma magically passes the argument to the handler.
- **Command Aliases**: Define multiple trigger words for the same command (e.g., `/ping`, `ping`, `pong` all trigger the same handler).
- **Conversations**: Easily build stateful, multi-step conversation flows that automatically capture and persist user input across different webhook requests.
- **Interactive Callbacks**: Map inline keyboard button clicks to specific methods inside your class seamlessly.
- **Builder Pattern for Keyboards**: Create inline keyboards easily via the `Keyboard` builder.
- **Dynamic Progress Bars**: Easily create and update visual progress bars within messages to keep users informed about long-running tasks.
- **Asynchronous Jobs**: Dispatch heavy tasks to run completely in the background without blocking the user or the webhook response.
- **Modular &amp; Clean Architecture**: Keep your code clean by isolating commands, conversations, and jobs in their own respective classes.
- **Auto-Discovery**: Magma can automatically scan a directory and register all your command, conversation, and job classes dynamically without manual requires.

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

[](#installation)

```
composer require irwinlopez1023/magma4telegram
```

Quick Start
-----------

[](#quick-start)

Initialize Magma by providing your Telegram Bot Token. You can let Magma discover your classes automatically.

```
