diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index 923586a..9b8fc1d 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -23,6 +23,7 @@ use TgBotLib\Methods\EditChatInviteLink; use TgBotLib\Methods\EditChatSubscriptionInviteLink; use TgBotLib\Methods\EditForumTopic; + use TgBotLib\Methods\EditGeneralForumTopic; use TgBotLib\Methods\ExportChatInviteLink; use TgBotLib\Methods\ForwardMessage; use TgBotLib\Methods\ForwardMessages; @@ -142,6 +143,7 @@ case REOPEN_FORUM_TOPIC = 'reopenForumTopic'; case DELETE_FORUM_TOPIC = 'deleteForumTopic'; case UNPIN_ALLL_FORUM_TOPIC_MESSAGES = 'UnpinAllForumTopicMessages'; + case EDIT_GENERAL_FORUM_TOPIC = 'editGeneralForumTopic'; /** * Executes a command on the provided bot with the given parameters. @@ -222,6 +224,7 @@ self::REOPEN_FORUM_TOPIC => ReopenForumTopic::execute($bot, $parameters), self::DELETE_FORUM_TOPIC => DeleteForumTopic::execute($bot, $parameters), self::UNPIN_ALLL_FORUM_TOPIC_MESSAGES => UnpinAllForumTopicMessages::execute($bot, $parameters), + self::EDIT_GENERAL_FORUM_TOPIC => EditGeneralForumTopic::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/EditGeneralForumTopic.php b/src/TgBotLib/Methods/EditGeneralForumTopic.php new file mode 100644 index 0000000..0fc3488 --- /dev/null +++ b/src/TgBotLib/Methods/EditGeneralForumTopic.php @@ -0,0 +1,38 @@ +value, $parameters))); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return [ + 'chat_id', + 'name' + ]; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return null; + } + } \ No newline at end of file