Add ReplaceStickerInSet method
This commit is contained in:
parent
cd03e91807
commit
c18a5778bc
2 changed files with 43 additions and 0 deletions
|
@ -67,6 +67,7 @@
|
||||||
use TgBotLib\Methods\PromoteChatMember;
|
use TgBotLib\Methods\PromoteChatMember;
|
||||||
use TgBotLib\Methods\ReopenForumTopic;
|
use TgBotLib\Methods\ReopenForumTopic;
|
||||||
use TgBotLib\Methods\ReopenGeneralForumTopic;
|
use TgBotLib\Methods\ReopenGeneralForumTopic;
|
||||||
|
use TgBotLib\Methods\ReplaceStickerInSet;
|
||||||
use TgBotLib\Methods\RestrictChatMember;
|
use TgBotLib\Methods\RestrictChatMember;
|
||||||
use TgBotLib\Methods\RevokeChatInviteLink;
|
use TgBotLib\Methods\RevokeChatInviteLink;
|
||||||
use TgBotLib\Methods\SendAnimation;
|
use TgBotLib\Methods\SendAnimation;
|
||||||
|
@ -220,6 +221,7 @@
|
||||||
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';
|
case DELETE_STICKER_FROM_SET = 'deleteStickerFromSet';
|
||||||
|
case REPLACE_STICKER_IN_SET = 'replaceStickerInSet';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes a command on the provided bot with the given parameters.
|
* Executes a command on the provided bot with the given parameters.
|
||||||
|
@ -339,6 +341,7 @@
|
||||||
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),
|
self::DELETE_STICKER_FROM_SET => DeleteStickerFromSet::execute($bot, $parameters),
|
||||||
|
self::REPLACE_STICKER_IN_SET => ReplaceStickerInSet::execute($bot, $parameters),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
40
src/TgBotLib/Methods/ReplaceStickerInSet.php
Normal file
40
src/TgBotLib/Methods/ReplaceStickerInSet.php
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace TgBotLib\Methods;
|
||||||
|
|
||||||
|
use TgBotLib\Abstracts\Method;
|
||||||
|
use TgBotLib\Bot;
|
||||||
|
use TgBotLib\Exceptions\NotImplementedException;
|
||||||
|
|
||||||
|
class ReplaceStickerInSet extends Method
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public static function execute(Bot $bot, array $parameters = []): true
|
||||||
|
{
|
||||||
|
throw new NotImplementedException("The method is not yet implemented, check back later");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public static function getRequiredParameters(): ?array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'user_id',
|
||||||
|
'name',
|
||||||
|
'old_sticker',
|
||||||
|
'sticker'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public static function getOptionalParameters(): ?array
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue