Files
max-bot-api-client-php/src/Models/Attachments/Buttons/Inline/ClipboardButton.php
T
2026-04-26 20:28:07 +03:00

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;
}
}