Add GetStickerSet method

This commit is contained in:
netkas 2024-11-14 22:36:02 -05:00
parent ea6fe91d9d
commit a5b472794d
2 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,38 @@
<?php
namespace TgBotLib\Objects;
use TgBotLib\Abstracts\Method;
use TgBotLib\Bot;
use TgBotLib\Enums\Methods;
use TgBotLib\Objects\Stickers\StickerSet;
class GetStickerSet extends Method
{
/**
* @inheritDoc
*/
public static function execute(Bot $bot, array $parameters = []): StickerSet
{
return StickerSet::fromArray(self::executeCurl(self::buildPost($bot, Methods::GET_STICKER_SET->value, $parameters)));
}
/**
* @inheritDoc
*/
public static function getRequiredParameters(): ?array
{
return [
'name'
];
}
/**
* @inheritDoc
*/
public static function getOptionalParameters(): ?array
{
return null;
}
}