Add BanChatSenderChat method to TgBotLib

This commit is contained in:
netkas 2024-11-06 00:18:45 -05:00
parent c535977bac
commit 3757b9106a
2 changed files with 41 additions and 0 deletions

View file

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