Download the PHP package chatflowphp/telegram without Composer

On this page you can find all versions of the php package chatflowphp/telegram. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package telegram

ChatFlow Telegram

CI PHPStan PHPUnit

chatflowphp/telegram is the Telegram adapter for the platform-neutral ChatFlow core.

It supports webhook and polling execution, commands, callback actions, smart render/edit-or-send behavior, media views, callback acknowledgements, Telegram file downloads and a typed Telegram layer for admin-style bots.

Full package documentation starts at docs/ai-index.md as compact context for AI-assisted bot implementation tasks.

Start Here

Quick Start

For a runnable version of this pattern, see examples/StarterBot.

Mapping

Telegram-Specific Layer

Keep portable handler code on ChatFlow\Core\Context. Use ChatFlow\Telegram\TelegramContext only when the flow needs Telegram-only behavior:

TelegramContext is intentionally not a facade for the Telegram Bot API. It only adds ChatFlow-aware Telegram helpers such as forceReply(), Telegram message options and current update metadata. Use core ack() for callback acknowledgements.

For publishing flows that need Telegram message_id immediately, inject ChatFlow\Telegram\TelegramPublisher and call sendMessage(), sendMedia(), sendMediaGroup(), editText(), editCaption() or deleteMessage() directly. Publisher methods return typed delivery results with chat id, message ids, endpoint and raw response. For Telegram Bot API endpoints not covered by ChatFlow semantics, inject Telegram\Bot\Api and use the SDK directly.

TelegramView and TelegramMessageOptions attach Telegram Bot API options to a neutral View via metadata:

Long callback payloads are stored automatically behind short cf:<token> callback data. Inbound callback queries are decoded back to the original action id and payload.

Inbound Telegram attachments are normalized for photos, documents, videos, animations, audio, voice, stickers and video notes. Telegram file_id, file_unique_id, captions, media group id, dimensions, duration, mime type and size are preserved in attachment metadata.

Media groups are collected by the adapter before core handling. The default collector waits briefly, aggregates updates with the same media_group_id, and emits one inbound event with ordered attachments.

TelegramScreenManager provides best-effort cleanup for command screens by tracking publisher delivery results and deleting previous message groups.

Operational Notes

The default file-backed callback payload store keeps long callback payloads for 7 days and removes expired tokens opportunistically. The default media group store keeps pending album parts for 5 minutes and also cleans stale groups opportunistically.

Telegram render() is intentionally best-effort: the adapter tries to edit the current message, then falls back to delete/send or send-only when Telegram rejects the edit. These fallbacks are logged through the Bot logger but do not fail the flow unless final delivery also fails.

StarterBot is the minimal runnable onboarding example. MiniShop is the advanced Telegram-specific example with commands, inline callback buttons, smart edit-or-send rendering, media replies, scenes, validation and sessions.

Observability

Pass runtimeObserver to the Bot constructor to receive core lifecycle events such as route matches, queued effects and delivery failures.

The MiniShop polling example enables JSONL runtime logs by default:

Set CHATFLOW_RUNTIME_LOG=/path/to/runtime.jsonl to override the log path.

Documentation

First Bot

Production Workflow

API Reference

License

This project is released under the MIT License. See LICENSE for details.


All versions of telegram with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
chatflowphp/core Version ^1.0
irazasyed/telegram-bot-sdk Version ^3.14
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package chatflowphp/telegram contains the following files

Loading the files please wait ...