Add CreateNewStickerSet method
This commit is contained in:
parent
36bc36e208
commit
94de6b6d54
2 changed files with 48 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
||||||
use TgBotLib\Methods\CreateChatInviteLink;
|
use TgBotLib\Methods\CreateChatInviteLink;
|
||||||
use TgBotLib\Methods\CreateChatSubscriptionInviteLink;
|
use TgBotLib\Methods\CreateChatSubscriptionInviteLink;
|
||||||
use TgBotLib\Methods\CreateForumTopic;
|
use TgBotLib\Methods\CreateForumTopic;
|
||||||
|
use TgBotLib\Methods\CreateNewStickerSet;
|
||||||
use TgBotLib\Methods\DeclineChatJoinRequest;
|
use TgBotLib\Methods\DeclineChatJoinRequest;
|
||||||
use TgBotLib\Methods\DeleteChatPhoto;
|
use TgBotLib\Methods\DeleteChatPhoto;
|
||||||
use TgBotLib\Methods\DeleteChatStickerSet;
|
use TgBotLib\Methods\DeleteChatStickerSet;
|
||||||
|
@ -212,6 +213,7 @@
|
||||||
case GET_STICKER_SET = 'getStickerSet';
|
case GET_STICKER_SET = 'getStickerSet';
|
||||||
case GET_CUSTOM_EMOJI_STICKERS = 'getCustomEmojiStickers';
|
case GET_CUSTOM_EMOJI_STICKERS = 'getCustomEmojiStickers';
|
||||||
case UPLOAD_STICKER_FILE = 'uploadStickerFile';
|
case UPLOAD_STICKER_FILE = 'uploadStickerFile';
|
||||||
|
case CREATE_NEW_STICKER_SET = 'createNewStickerSet';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes a command on the provided bot with the given parameters.
|
* Executes a command on the provided bot with the given parameters.
|
||||||
|
@ -327,6 +329,7 @@
|
||||||
self::GET_STICKER_SET => GetStickerSet::execute($bot, $parameters),
|
self::GET_STICKER_SET => GetStickerSet::execute($bot, $parameters),
|
||||||
self::GET_CUSTOM_EMOJI_STICKERS => GetCustomEmojiStickers::execute($bot, $parameters),
|
self::GET_CUSTOM_EMOJI_STICKERS => GetCustomEmojiStickers::execute($bot, $parameters),
|
||||||
self::UPLOAD_STICKER_FILE => UploadStickerFile::execute($bot, $parameters),
|
self::UPLOAD_STICKER_FILE => UploadStickerFile::execute($bot, $parameters),
|
||||||
|
self::CREATE_NEW_STICKER_SET => CreateNewStickerSet::execute($bot, $parameters),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
45
src/TgBotLib/Methods/CreateNewStickerSet.php
Normal file
45
src/TgBotLib/Methods/CreateNewStickerSet.php
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace TgBotLib\Methods;
|
||||||
|
|
||||||
|
use TgBotLib\Abstracts\Method;
|
||||||
|
use TgBotLib\Bot;
|
||||||
|
use TgBotLib\Enums\Methods;
|
||||||
|
use TgBotLib\Exceptions\NotImplementedException;
|
||||||
|
use TgBotLib\Objects\Message;
|
||||||
|
|
||||||
|
class CreateNewStickerSet extends Method
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public static function execute(Bot $bot, array $parameters = []): mixed
|
||||||
|
{
|
||||||
|
throw new NotImplementedException('Method not implemented yet, check back later.');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public static function getRequiredParameters(): ?array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'user_id',
|
||||||
|
'name',
|
||||||
|
'title',
|
||||||
|
'stickers'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public static function getOptionalParameters(): ?array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'sticker_type',
|
||||||
|
'needs_repainting'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue