Telepath
Create Telegram Bots with this modern PHP library
Explore the docs »
Report Bug · Request Feature
Table of Contents
About The Project
Telepath is a modern framework-agnostic libraray to create Telegram Bots in PHP.
It stands out by generating a lot of PHP Code automatically from the Telegram Bot API documentation and using modern PHP features like Attributes and Named Parameters.
Before You Start
We want to make use of modern PHP all the way but the development of PHP doesn't stop. This means if there will be a feature in a new PHP version that makes sense to use in this package, we will.
So beware of that and only use this library if you're running in a setup where you can easily upgrade to new PHP versions when they get released.
Usage
- Require this package with
composer require telepath/telepath
- Create an instance and pass it your Bot API Token via
$bot = new TelegramBot($token);
- Call all available methods of the Telegram Bot API via the Bot Instance, like
$bot->sendMessage($chatId, $text);
For a more detailled look including how to receive and react to messages and commands, have a look into our Documentation
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE.md for more information.
Contact
Tii - @TiiFuchs - [email protected]
Project Link: https://github.com/telepath-php/telepath