Add DeclineChatJoinRequest Method

This commit is contained in:
netkas 2024-11-06 15:39:58 -05:00
parent 78b4f8c24d
commit 9889abf149
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 DeclineChatJoinRequest extends Method
{
/**
* @inheritDoc
*/
public static function execute(Bot $bot, array $parameters = []): true
{
return (bool)self::executeCurl(self::buildPost($bot, Methods::DECLINE_CHAT_JOIN_REQUEST->value, $parameters));
}
/**
* @inheritDoc
*/
public static function getRequiredParameters(): ?array
{
return [
'chat_id',
'user_id'
];
}
/**
* @inheritDoc
*/
public static function getOptionalParameters(): ?array
{
return null;
}
}