tgbotlib/src/TgBotLib/Methods/ExportChatInviteLink.php
2024-11-06 15:10:25 -05:00

38 lines
No EOL
849 B
PHP

<?php
namespace TgBotLib\Methods;
use TgBotLib\Abstracts\Method;
use TgBotLib\Bot;
use TgBotLib\Enums\Methods;
use TgBotLib\Objects\ChatInviteLink;
class ExportChatInviteLink extends Method
{
/**
* @inheritDoc
*/
public static function execute(Bot $bot, array $parameters = []): string
{
return (string)self::executeCurl(self::buildPost($bot, Methods::EXPORT_CHAT_INVITE_LINK->value, $parameters));
}
/**
* @inheritDoc
*/
public static function getRequiredParameters(): ?array
{
return [
'chat_id'
];
}
/**
* @inheritDoc
*/
public static function getOptionalParameters(): ?array
{
return null;
}
}