mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-26 23:14:38 +01:00
add more info for getBotApp method
This commit is contained in:
parent
9f576a4efc
commit
1780081478
@ -16,15 +16,15 @@
|
||||
|
||||
namespace danog\MadelineProto\EventHandler;
|
||||
|
||||
use danog\MadelineProto\EventHandler\Media\Document;
|
||||
use danog\MadelineProto\EventHandler\Media\Photo;
|
||||
use danog\MadelineProto\MTProto;
|
||||
use JsonSerializable;
|
||||
use ReflectionClass;
|
||||
use ReflectionProperty;
|
||||
use danog\MadelineProto\MTProto;
|
||||
use danog\MadelineProto\EventHandler\Media\Document;
|
||||
use danog\MadelineProto\EventHandler\Media\Photo;
|
||||
|
||||
/**
|
||||
* Represents information about a named bot web app.
|
||||
* Represents information about a [named bot web app](https://core.telegram.org/api/bots/webapps#named-bot-web-apps).
|
||||
*/
|
||||
final class BotApp implements JsonSerializable
|
||||
{
|
||||
@ -51,8 +51,19 @@ final class BotApp implements JsonSerializable
|
||||
|
||||
/** @var int Hash to pass to [messages.getBotApp](https://docs.madelineproto.xyz/API_docs/methods/messages.getBotApp.html), to avoid refetching bot app info if it hasn’t changed. */
|
||||
public readonly int $hash;
|
||||
public function __construct(
|
||||
MTProto $API,
|
||||
array $rawBotApp,
|
||||
|
||||
/** @var bool Whether the web app was never used by the user, and confirmation must be asked from the user before opening it. */
|
||||
public readonly ?bool $inactive = null,
|
||||
|
||||
public function __construct(MTProto $API, array $rawBotApp)
|
||||
/** @var bool The bot is asking permission to send messages to the user: if the user agrees, set the write_allowed flag when invoking [messages.requestAppWebView](https://docs.madelineproto.xyz/API_docs/methods/messages.requestAppWebView.html). */
|
||||
public readonly ?bool $requestWriteAccess = null,
|
||||
|
||||
/** @var bool */
|
||||
public readonly ?bool $hasSettings = null,
|
||||
)
|
||||
{
|
||||
$this->id = $rawBotApp['id'];
|
||||
$this->accessHash = $rawBotApp['access_hash'];
|
||||
|
Loading…
Reference in New Issue
Block a user