salo-man/ laravel-madeline-proto
一个第三方Telegram客户端库danog/MadelineProto的Laravel包装器
dev-master
2023-09-18 21:19 UTC
Requires
- php: ^8.1
- danog/madelineproto: ^8
Requires (Dev)
- phabel/phabel: ^1.0
This package is auto-updated.
Last update: 2024-09-18 23:51:46 UTC
README
一个第三方Telegram客户端库danog/MadelineProto的Laravel包装器。
入门
将laravel-madeline-proto添加到项目依赖中
composer require salo-man/laravel-madeline-proto
然后发布telegram.php
配置文件
php artisan vendor:publish --provider="Hu\MadelineProto\MadelineProtoServiceProvider"
通过提供环境变量来设置Telegram API密钥
MP_TELEGRAM_API_ID=... //your telegram api id here MP_TELEGRAM_API_HASH=... //your telegram api hash here
此包装器支持运行单个/多个Telegram账户。
深入了解
有关laravel-madeline-proto的更多信息,请查看wiki
注意
-
此包装器包尚未包含所有API,我仍然专注于包装消息API。
-
如果您在Messages门面中找不到想要的方法或需要使用默认的danog/MadelineProto API,您可能想使用
MadelineProto::getClient()
门面方法。这将返回danog\MadelineProto\API
对象,您可以在其中调用danog/MadelineProto库提供的所有方法。
感谢
Bryan Ramaputra帮助我编写可读性强的文档。