bazzastyle/bazzabot
最新稳定版本:2.2
Composer 安装命令:
composer create-project bazzastyle/bazzabot
包简介
A simple way to communicate with Telegram APIs in PHP.
README 文档
README
BazzaBot is a simple way to communicate with Telegram APIs in PHP
Requirements
PHP 8.4 or higher
From composer: amphp/http-client 5.0 amphp/file 3.0
Installation
composer require bazzastyle/bazzabot
- Copy the example folder outside the vendor folder and rename it as you wish.
- Rename env-sample.php to env.php
Environment
Set the required values in the env.php file
Webhook
Open setupWebhook.php in your browser and follow the setup wizard.
GetUpdates
Usage
- Look at the examples (webhook.php and getUpdates.php), it's very simple if you know PHP and OOP
- All methods have the parameters in the same order as the BotAPIs
Custom endpoint
With the Bot API 5.0 it is now possible to self host your own Bot API, here is an example of how to add your own endpoint
Json payload
Only works with webhooks, for more info: https://core.telegram.org/bots/faq#how-can-i-make-requests-in-response-to-updates
I do not recommend using it as it may need a particular configuration to the webserver for flushing and you cannot get a response from the Bot API
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: AGPL-3.0-or-later
- 更新时间: 2025-07-03