diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index 359fa97..5bda069 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -14,6 +14,7 @@ use TgBotLib\Methods\CreateChatSubscriptionInviteLink; use TgBotLib\Methods\DeleteWebhook; use TgBotLib\Methods\EditChatInviteLink; + use TgBotLib\Methods\EditChatSubscriptionInviteLink; use TgBotLib\Methods\ExportChatInviteLink; use TgBotLib\Methods\ForwardMessage; use TgBotLib\Methods\ForwardMessages; @@ -92,6 +93,7 @@ case CREATE_CHAT_INVITE_LINK = 'createChatInviteLink'; case EDIT_CHAT_INVITE_LINK = 'editChatInviteLink'; case CREATE_CHAT_SUBSCRIPTION_INVITE_LINK = 'createChatSubscriptionInviteLink'; + case EDIT_CHAT_SUBSCRIPTION_INVITE_LINK = 'editChatSubscriptionInviteLink'; /** * Executes a command on the provided bot with the given parameters. @@ -147,6 +149,7 @@ self::CREATE_CHAT_INVITE_LINK => CreateChatInviteLink::execute($bot, $parameters), self::EDIT_CHAT_INVITE_LINK => EditChatInviteLink::execute($bot, $parameters), self::CREATE_CHAT_SUBSCRIPTION_INVITE_LINK => CreateChatSubscriptionInviteLink::execute($bot, $parameters), + self::EDIT_CHAT_SUBSCRIPTION_INVITE_LINK => EditChatSubscriptionInviteLink::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/EditChatSubscriptionInviteLink.php b/src/TgBotLib/Methods/EditChatSubscriptionInviteLink.php new file mode 100644 index 0000000..ef01410 --- /dev/null +++ b/src/TgBotLib/Methods/EditChatSubscriptionInviteLink.php @@ -0,0 +1,43 @@ +value, $parameters)) + ); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return [ + 'chat_id', + 'invite_link' + ]; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return [ + 'name' + ]; + } + } \ No newline at end of file