mirror of
https://github.com/BushlanovDev/max-bot-api-client-php.git
synced 2026-08-20 11:52:57 +00:00
27 lines
655 B
PHP
27 lines
655 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace BushlanovDev\MaxMessengerBot\Models\Attachments\Buttons\Inline;
|
|
|
|
use BushlanovDev\MaxMessengerBot\Enums\InlineButtonType;
|
|
|
|
/**
|
|
* A button that, when clicked, copies text to the clipboard.
|
|
*/
|
|
final readonly class ClipboardButton extends AbstractInlineButton
|
|
{
|
|
public ?string $payload;
|
|
|
|
/**
|
|
* @param string $text Visible button text (1 to 128 characters).
|
|
* @param string $payload Text which will be copied.
|
|
*/
|
|
public function __construct(string $text, string $payload)
|
|
{
|
|
parent::__construct(InlineButtonType::Clipboard, $text);
|
|
|
|
$this->payload = $payload;
|
|
}
|
|
}
|