matmper/php-telegram-sdk-bot
最新稳定版本:1.0.0
Composer 安装命令:
composer require matmper/php-telegram-sdk-bot
包简介
The PHP Telegram SDK (BOT) is a easy-to-use package designed to simplify the integration of Telegram bots into PHP applications
README 文档
README
Requirements
- PHP `^8.0`
- cURL Extension
Installation
Install the package via Composer:
$ composer require matmper/php-telegram-sdk-bot
Usage
This package allows you to easily interact with Telegram's Bot API. You can send messages, receive updates, and handle bot interactions with a few lines of code.
Create Telegram BOT: From BotFather to Hello World
Sending a Message
Telegram Doc: sendMessage
require 'vendor/autoload.php'; use Matmper\TelegramBot; use Matmper\Enum\ParseMode; $botToken = '12345678:a1b2c3d4f5g6'; $chatID = '-100000000'; $telegram = new TelegramBot($botToken, $chatID); $telegram->sendMessage('Hello world!'); // Send more optional options in the body of the request $telegram->sendMessage('<b>Hello world!</b>', ['parse_mode' => ParseMode::HTML->value]);
Contribution & Development
Contributions are welcome! This project is open-source and free for distribution.
Development Setup
Clone the repository and install dependencies:
$ composer install --dev --prefer-dist
Ensure all tests and coding standards are met before submitting a pull request:
$ composer check
All contributions must be submitted via pull requests and must pass tests and coding standards before being merged.
统计信息
- 总下载量: 126
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2025-02-24