hadi-aj / intellisense-telegram-bot
A Telegram Bot Package compatible with PHP IDE
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/hadi-aj/intellisense-telegram-bot
Requires
- guzzlehttp/guzzle: ^7.9
README
A Telegram Bot Package for PHP with built-in documentation support to activate IntelliSense in modern PHP IDEs.
🚀 Why use this?
- Provides complete PHPDoc type definitions for the Telegram Bot API.
- IDEs such as PHPStorm or VSCode get full code completion, inline docs, and static analysis support for Telegram Bot functionality.
⚙️ Installation
Install via Composer:
composer require hadi-aj/intellisense-telegram-bot
🧩 Usage
Simply import and include the package in your project:
<?php require 'vendor/autoload.php'; use HadiAj\IntelliSenseTelegramBot\Telegram; // Now you can instantiate new Telegram(...) and enjoy full IntelliSense support.
You’ll receive namespace-scoped classes and methods already annotated with PHPDoc types. No need for extra stubs or manual typedefs.
📦 What’s inside
- Entire Telegram Bot API mapped to PHP classes and methods.
- Extensive PHPDoc comments to empower static analyzers and IDE autocomplete.
- A
composer.jsonthat requiresguzzlehttp/guzzle(version ^7.9) as dependency.
📝 Example
Here’s a minimal example showcasing how completion works inside an IDE:
<?php use HadiAj\IntelliSenseTelegramBot\Telegram; $bot = new Telegram('TELEGRAM_BOT_TOKEN'); $response = $bot->sendMessage([ 'chat_id' => 12345678, 'text' => 'Hello from IntelliSense-enabled Telegram Bot!' ]); echo $response->message_id;
Inside an IDE, as you type $bot->send…, suggestions pop up immediately, and parameter types and return objects are fully documented.
🛠 Contributing
Contributions, feature requests, and bug reports are welcome! Please open an issue or a pull request.
Getting started:
- Fork the repository
- Make your changes
- Submit a PR for review
📄 License
Distributed under the MIT License—see the LICENSE file.