Download the PHP package danyspin97/php-bot-framework without Composer
On this page you can find all versions of the php package danyspin97/php-bot-framework. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download danyspin97/php-bot-framework
More information about danyspin97/php-bot-framework
Files in danyspin97/php-bot-framework
Package php-bot-framework
Short Description PhpBotFramework is a framework for Telegram Bots' APIs.
License LGPL-3.0+
Homepage https://danyspin97.github.io/PhpBotFramework
Informations about the package php-bot-framework
Php Bot Framework
PhpBotFramework is a reliable and complete framework for Telegram Bot API with support to Payments APIs.
Designed to be fast and easy to use, it provides all the features a user need in order to start developing Telegram bots.
Usage
Features
- Modular: take only what you need
- Flexible HTTP requests with Guzzle
- Designed to be fast and easy to use
- Support for local updates and webhooks
- Support for the most important API methods
- Command-handle system for messages and callback queries
- Update type based processing
- Easy inline keyboard creation
- Inline query results' handler
- Database support and facilities
- Redis support
- Support for multilanguage bots
- Support for bot states
- Upload local files
- Highly-documented
Requisites
- PHP >= 7.0
- php-mbstring
- Composer (to install this package and the required ones)
- Web server: required for webhook (we recommend nginx)
- SSL certificate: required for webhook (follow these steps to make a self-signed certificate or use Let's Encrypt)
Installation
You can install PhpBotFramework using Composer.
Go to your project's folder and type:
Documentation
Check the documentation for learning more about PhpBotFramework.
FAQ
-
Why we don't implement asynchronous requests?
We use Guzzle in order to fire HTTP requests to Telegram Bot API.
Unfortunately it doesn't implement real asynchronous requests but a sort of.
Take a look to this issue for more information.
-
Why there isn't a
chat_id
parameter to pass for API methods?PhpBotFramework is "smart" enough to set it as the current user, group or channel ID. Most of the frameworks out there requires you to specify the chat ID for every method's call but PhpBotFramework does it for you calling most API methods on the current chat.
Examples
You can find a list of examples bot right in examples/
folder.
All examples listed here are fully functional: you only need a valid Telegram bot token.
Made with PhpBotFramework
Testing
PhpBotFramework comes with a test suite you can run using PHPUnit.
You need to set MOCK_SERVER_PORT
environment variable which tells PhpBotFramework
on which port run the mock server that allows the tests to be executed.
Now you can run the run the mock server:
And run the test suite:
Author
This framework is developed and mantained by Danilo Spinella and Dom Corvasce.
License
PhpBotFramework is released under GNU Lesser General Public License v3.
You may copy, distribute and modify the software provided that modifications are described and licensed for free under LGPL-3. Derivatives works (including modifications) can only be redistributed under LGPL-3, but applications that use the framework don't have to be.