tgbotlib/src/TgBotLib/Methods/GetMyName.php
2024-11-13 15:25:17 -05:00

38 lines
No EOL
838 B
PHP

<?php
namespace TgBotLib\Methods;
use TgBotLib\Abstracts\Method;
use TgBotLib\Bot;
use TgBotLib\Enums\Methods;
use TgBotLib\Objects\BotName;
class GetMyName extends Method
{
/**
* @inheritDoc
*/
public static function execute(Bot $bot, array $parameters = []): BotName
{
return BotName::fromArray(self::executeCurl(self::buildPost($bot, Methods::GET_MY_NAME->value, $parameters)));
}
/**
* @inheritDoc
*/
public static function getRequiredParameters(): ?array
{
return null;
}
/**
* @inheritDoc
*/
public static function getOptionalParameters(): ?array
{
return [
'language_code'
];
}
}