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

39 lines
No EOL
886 B
PHP

<?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)self::executeCurl(self::buildPost($bot, 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;
}
}