Add SetChatAdministratorCustomTitle method

This commit is contained in:
netkas 2024-11-06 00:16:34 -05:00
parent 47fde54d40
commit c535977bac
2 changed files with 42 additions and 0 deletions

View file

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