Add DeleteStickerFromSet method
This commit is contained in:
parent
9a7fb4194f
commit
cd03e91807
2 changed files with 40 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
||||||
use TgBotLib\Methods\DeleteMessage;
|
use TgBotLib\Methods\DeleteMessage;
|
||||||
use TgBotLib\Methods\DeleteMessages;
|
use TgBotLib\Methods\DeleteMessages;
|
||||||
use TgBotLib\Methods\DeleteMyCommands;
|
use TgBotLib\Methods\DeleteMyCommands;
|
||||||
|
use TgBotLib\Methods\DeleteStickerFromSet;
|
||||||
use TgBotLib\Methods\DeleteWebhook;
|
use TgBotLib\Methods\DeleteWebhook;
|
||||||
use TgBotLib\Methods\EditChatInviteLink;
|
use TgBotLib\Methods\EditChatInviteLink;
|
||||||
use TgBotLib\Methods\EditChatSubscriptionInviteLink;
|
use TgBotLib\Methods\EditChatSubscriptionInviteLink;
|
||||||
|
@ -218,6 +219,7 @@
|
||||||
case CREATE_NEW_STICKER_SET = 'createNewStickerSet';
|
case CREATE_NEW_STICKER_SET = 'createNewStickerSet';
|
||||||
case ADD_STICKER_TO_SET = 'addStickerToSet';
|
case ADD_STICKER_TO_SET = 'addStickerToSet';
|
||||||
case SET_STICKER_POSITION_IN_SET = 'setStickerPositionInSet';
|
case SET_STICKER_POSITION_IN_SET = 'setStickerPositionInSet';
|
||||||
|
case DELETE_STICKER_FROM_SET = 'deleteStickerFromSet';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes a command on the provided bot with the given parameters.
|
* Executes a command on the provided bot with the given parameters.
|
||||||
|
@ -336,6 +338,7 @@
|
||||||
self::CREATE_NEW_STICKER_SET => CreateNewStickerSet::execute($bot, $parameters),
|
self::CREATE_NEW_STICKER_SET => CreateNewStickerSet::execute($bot, $parameters),
|
||||||
self::ADD_STICKER_TO_SET => AddStickerToSet::execute($bot, $parameters),
|
self::ADD_STICKER_TO_SET => AddStickerToSet::execute($bot, $parameters),
|
||||||
self::SET_STICKER_POSITION_IN_SET => SetStickerPositionInSet::execute($bot, $parameters),
|
self::SET_STICKER_POSITION_IN_SET => SetStickerPositionInSet::execute($bot, $parameters),
|
||||||
|
self::DELETE_STICKER_FROM_SET => DeleteStickerFromSet::execute($bot, $parameters),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
37
src/TgBotLib/Methods/DeleteStickerFromSet.php
Normal file
37
src/TgBotLib/Methods/DeleteStickerFromSet.php
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace TgBotLib\Methods;
|
||||||
|
|
||||||
|
use TgBotLib\Abstracts\Method;
|
||||||
|
use TgBotLib\Bot;
|
||||||
|
use TgBotLib\Enums\Methods;
|
||||||
|
|
||||||
|
class DeleteStickerFromSet extends Method
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public static function execute(Bot $bot, array $parameters = []): true
|
||||||
|
{
|
||||||
|
return (bool)self::executeCurl(self::buildPost($bot, Methods::DELETE_STICKER_FROM_SET->value, $parameters));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public static function getRequiredParameters(): ?array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'sticker'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public static function getOptionalParameters(): ?array
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue