Add DeleteStickerSet method
This commit is contained in:
parent
9468bdda90
commit
ee5f8fb06f
2 changed files with 39 additions and 0 deletions
|
@ -232,6 +232,7 @@
|
||||||
case SET_STICKER_SET_TITLE = 'setStickerSetTitle';
|
case SET_STICKER_SET_TITLE = 'setStickerSetTitle';
|
||||||
case SET_STICKER_SET_THUMBNAIL = 'setStickerSetThumbnail';
|
case SET_STICKER_SET_THUMBNAIL = 'setStickerSetThumbnail';
|
||||||
case SET_CUSTOM_EMOJI_STICKER_SET_THUMBNAIL = 'setCustomEmojiStickerSetThumbnail';
|
case SET_CUSTOM_EMOJI_STICKER_SET_THUMBNAIL = 'setCustomEmojiStickerSetThumbnail';
|
||||||
|
case DELETE_STICKER_SET = 'deleteStickerSet';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes a command on the provided bot with the given parameters.
|
* Executes a command on the provided bot with the given parameters.
|
||||||
|
@ -357,6 +358,7 @@
|
||||||
self::SET_STICKER_SET_TITLE => SetStickerSetTitle::execute($bot, $parameters),
|
self::SET_STICKER_SET_TITLE => SetStickerSetTitle::execute($bot, $parameters),
|
||||||
self::SET_STICKER_SET_THUMBNAIL => SetStickerSetThumbnail::execute($bot, $parameters),
|
self::SET_STICKER_SET_THUMBNAIL => SetStickerSetThumbnail::execute($bot, $parameters),
|
||||||
self::SET_CUSTOM_EMOJI_STICKER_SET_THUMBNAIL => SetCustomEmojiStickerSetThumbnail::execute($bot, $parameters),
|
self::SET_CUSTOM_EMOJI_STICKER_SET_THUMBNAIL => SetCustomEmojiStickerSetThumbnail::execute($bot, $parameters),
|
||||||
|
self::DELETE_STICKER_SET => DeleteStickerFromSet::execute($bot, $parameters),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
37
src/TgBotLib/Methods/DeleteStickerSet.php
Normal file
37
src/TgBotLib/Methods/DeleteStickerSet.php
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace TgBotLib\Methods;
|
||||||
|
|
||||||
|
use TgBotLib\Abstracts\Method;
|
||||||
|
use TgBotLib\Bot;
|
||||||
|
use TgBotLib\Enums\Methods;
|
||||||
|
|
||||||
|
class DeleteStickerSet extends Method
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public static function execute(Bot $bot, array $parameters = []): true
|
||||||
|
{
|
||||||
|
return (bool)self::executeCurl(self::buildPost($bot, Methods::DELETE_STICKER_SET->value, $parameters));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public static function getRequiredParameters(): ?array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'name'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public static function getOptionalParameters(): ?array
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue