maksa988 / laravel-madeline-proto
为Laravel封装的第三方Telegram客户端库danog/MadelineProto
dev-master
2022-08-03 21:08 UTC
Requires
- php: ^7.4|^8.0
- danog/madelineproto: ^7
This package is auto-updated.
Last update: 2024-08-30 01:47:28 UTC
README
为Laravel封装的第三方Telegram客户端库danog/MadelineProto。
入门指南
将laravel-madeline-proto添加到项目依赖
composer require setiawanhu/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账号或多个Telegram账号。
深入了解
有关laravel-madeline-proto的更多使用详情,请查看wiki。
注意事项
-
此封装包尚未封装所有API,我仍在专注于封装消息API。
-
如果您在Messages外观中找不到您想要的方法或需要使用默认的danog/MadelineProto API,您可能想使用
MadelineProto::getClient()外观方法。它将返回danog\MadelineProto\API对象,您可以在其中调用danog/MadelineProto库提供的所有方法。
感谢
Bryan Ramaputra帮助我编写可读性强的文档。