Add GetMe method to TgBotLib
This commit is contained in:
parent
3dd46c8d27
commit
fb381c5138
1 changed files with 19 additions and 0 deletions
19
src/TgBotLib/Methods/GetMe.php
Normal file
19
src/TgBotLib/Methods/GetMe.php
Normal 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)));
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue