Add ExportChatInviteLink method to TgBotLib

This commit is contained in:
netkas 2024-11-06 00:24:46 -05:00
parent 307521debc
commit 2f2fefbe9d
2 changed files with 40 additions and 0 deletions

View file

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