Add GetMe method to TgBotLib

This commit is contained in:
netkas 2024-09-30 02:35:54 -04:00
parent 3dd46c8d27
commit fb381c5138

View file

@ -0,0 +1,19 @@
<?php
namespace TgBotLib\Methods;
use TgBotLib\Abstracts\Method;
use TgBotLib\Bot;
use TgBotLib\Enums\Methods;
use TgBotLib\Objects\Telegram\User;
class GetMe extends Method
{
/**
* @inheritDoc
*/
public static function execute(Bot $bot, array $parameters=[]): User
{
return User::fromArray(self::executeCurl(self::buildPost($bot, Methods::GET_ME->value)));
}
}