Add DeleteChatStickerSet method to TgBotLib
This commit is contained in:
parent
f000bc422d
commit
fedf177803
2 changed files with 40 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
|||
use TgBotLib\Methods\CreateChatSubscriptionInviteLink;
|
||||
use TgBotLib\Methods\DeclineChatJoinRequest;
|
||||
use TgBotLib\Methods\DeleteChatPhoto;
|
||||
use TgBotLib\Methods\DeleteChatStickerSet;
|
||||
use TgBotLib\Methods\DeleteWebhook;
|
||||
use TgBotLib\Methods\EditChatInviteLink;
|
||||
use TgBotLib\Methods\EditChatSubscriptionInviteLink;
|
||||
|
@ -126,6 +127,7 @@
|
|||
case GET_CHAT_MEMBER_COUNT = 'getChatMemberCount';
|
||||
case GET_CHAT_MEMBER = 'getChatMember';
|
||||
case SET_CHAT_STICKER_SET = 'setChatStickerSet';
|
||||
case DELETE_CHAT_STICKER_SET = 'deleteChatStickerSet';
|
||||
|
||||
/**
|
||||
* Executes a command on the provided bot with the given parameters.
|
||||
|
@ -198,6 +200,7 @@
|
|||
self::GET_CHAT_MEMBER_COUNT => GetChatMemberCount::execute($bot, $parameters),
|
||||
self::GET_CHAT_MEMBER => GetChatMember::execute($bot, $parameters),
|
||||
self::SET_CHAT_STICKER_SET => SetChatStickerSet::execute($bot, $parameters),
|
||||
self::DELETE_CHAT_STICKER_SET => DeleteChatStickerSet::execute($bot, $parameters),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
37
src/TgBotLib/Methods/DeleteChatStickerSet.php
Normal file
37
src/TgBotLib/Methods/DeleteChatStickerSet.php
Normal file
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Methods;
|
||||
|
||||
use TgBotLib\Abstracts\Method;
|
||||
use TgBotLib\Bot;
|
||||
use TgBotLib\Enums\Methods;
|
||||
|
||||
class DeleteChatStickerSet extends Method
|
||||
{
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function execute(Bot $bot, array $parameters = []): true
|
||||
{
|
||||
return (bool)self::executeCurl(self::buildPost($bot, Methods::DELETE_CHAT_STICKER_SET->value, $parameters));
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getRequiredParameters(): ?array
|
||||
{
|
||||
return [
|
||||
'chat_id'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getOptionalParameters(): ?array
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue