Download the PHP package muaath5/simple-bot-api without Composer
On this page you can find all versions of the php package muaath5/simple-bot-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download muaath5/simple-bot-api
More information about muaath5/simple-bot-api
Files in muaath5/simple-bot-api
Package simple-bot-api
Short Description Simple & Easy Telegram Bot API in PHP
License GPL-3.0-only
Informations about the package simple-bot-api
Simple Bot API
This is a simple Telegram Bot API library in PHP. This library should support all Bot API methods in any version update. I created this library to make creating bots more simpliler, No need to bunch of classes And objects after today!
Features
- Always supports all Bot API methods
- Auto handling for flood & chat ID migrating errors
- Uses
stdClass
for updates - Uses OOP
- Optional Settings for each bot can be saved in JSON
- Based on cURL for speed
- Downloadable via composer
- Tested via GitHub Actions
- Has examples of working bots
- Telegram Errors as PHP Exceptions
- Up to date
- Documented
Installation
Simple Usage
Creating bot
More documentation here
Using method
It should be in this format:
Like this:
Note: There's NO PROBLEM if methodName
was in upper or lower case.
Contibuting
You can contribute by:
- Reporting a bug.
- Suggesting a feature.
- Improving code style.
- Completing the TODO List.
- Adding more examples to
examples/
. - Documenting undocumented topics in
docs/
. - Updating the library to the next version of Bot API (if needed).
- Adding more tests in
test/
folder.
Contact me
Examples
Currently, There're three examples in examples/
folder:
- Echo Bot, Which sends same as you sent
- Weclome Bot, Which sends Welcome & ID of user who joins the group
- Contact Me Bot, Which is a Bot be same as you, You'll receive messages & Reply
- FAQ Bot, Which has one message & buttons to swap between questions, And you can see answers.
You can see a full example here
All of these examples doesn't need any databases or files to storage, Only Settings file.
TODO List
- [x] API via HTTP response in webhooks method
- [x] Using namespace for exceptions
- [x] Documenting sending message with reply markup
- [x] Add webhook authorization
- [x] Auto-store for bot users
- [x] Add JSON Storage can be used by bot
- [x] Method that posts to all bot users
- [X] Add logging
- [ ] Add DB Storage can be used by bot
- [ ] Document missed things
License
GPL-3.0, In LICENCE file.