Skip to content

Create modern Telegram Bots with PHP.

License

Notifications You must be signed in to change notification settings

telepath-php/telepath

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

Telepath

Create Telegram Bots with this modern PHP library
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Before You Start
  3. Usage
  4. Contributing
  5. License
  6. Contact

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.

(back to top)

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.

(back to top)

Usage

  1. Require this package with composer require telepath/telepath
  2. Create an instance and pass it your Bot API Token via $bot = new \Telepath\Bot($apiToken);
  3. 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

(back to top)

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.md for more information.

(back to top)

Contact

Tii - @TiiFuchs - [email protected]

Project Link: https://github.com/telepath-php/telepath

(back to top)