shmelevdi/swc-laravel-madeline-proto

为 Laravel 定制的第三方 Telegram 客户端库 danog/MadelineProto 包装器

1.3.0 2021-10-28 12:43 UTC

This package is not auto-updated.

Last update: 2024-09-28 21:05:30 UTC


README

Latest Stable Version Total Downloads License

为 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 账户。

深入了解

请查阅 wiki 了解关于 laravel-madeline-proto 使用的更多详细信息

注意事项

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

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

感谢

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