ousid / laravel-madeline-proto

用于Laravel的第三方Telegram客户端库danog/MadelineProto包装器

v1.4.0 2022-04-01 12:56 UTC

This package is auto-updated.

Last update: 2024-08-29 06:01:56 UTC


README

Latest Stable Version Total Downloads License

这是用于Laravel的第三方Telegram客户端库danog/MadelineProto的包装器。

注意

这是一个从setiawanhu/laravel-madeline-proto分叉的包,我已经将其升级到最新版本,并重新发布

入门指南

将laravel-madeline-proto添加到项目依赖中

composer require ousid/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账户。

深入了解

请查看wiki以获取关于laravel-madeline-proto使用的更多详细信息

注意

  • 此包装器包尚未包含所有API,我仍然专注于包装消息API。

  • 如果您在Messages外观中找不到您想要的方法或需要使用默认的danog/MadelineProto API,您可能想使用MadelineProto::getClient()外观方法。这将返回danog\MadelineProto\API对象,您可以在其中调用danog/MadelineProto库提供的所有方法。

感谢

Bryan Ramaputra 帮助我编写可读性强的文档。