devability/laravel-madeline-proto

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

1.0.4 2020-09-12 00:59 UTC

This package is auto-updated.

Last update: 2024-09-12 10:15:42 UTC


README

Latest Stable Version Total Downloads License

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

入门

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

composer require devability/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 库提供的所有方法。