37 lines
No EOL
813 B
PHP
37 lines
No EOL
813 B
PHP
<?php
|
|
|
|
namespace TgBotLib\Methods;
|
|
|
|
use TgBotLib\Abstracts\Method;
|
|
use TgBotLib\Bot;
|
|
use TgBotLib\Enums\Methods;
|
|
|
|
class SetChatTitle extends Method
|
|
{
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public static function execute(Bot $bot, array $parameters = []): true
|
|
{
|
|
return (bool)(self::executeCurl(self::buildPost($bot, Methods::SET_CHAT_TITLE->value, $parameters)));
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public static function getRequiredParameters(): ?array
|
|
{
|
|
return [
|
|
'chat_id',
|
|
'title'
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public static function getOptionalParameters(): ?array
|
|
{
|
|
return null;
|
|
}
|
|
} |