diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index afc491a..eebe47a 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -13,12 +13,14 @@ use TgBotLib\Methods\CopyMessages; use TgBotLib\Methods\CreateChatInviteLink; use TgBotLib\Methods\CreateChatSubscriptionInviteLink; + use TgBotLib\Methods\CreateForumTopic; use TgBotLib\Methods\DeclineChatJoinRequest; use TgBotLib\Methods\DeleteChatPhoto; use TgBotLib\Methods\DeleteChatStickerSet; use TgBotLib\Methods\DeleteWebhook; use TgBotLib\Methods\EditChatInviteLink; use TgBotLib\Methods\EditChatSubscriptionInviteLink; + use TgBotLib\Methods\EditForumTopic; use TgBotLib\Methods\ExportChatInviteLink; use TgBotLib\Methods\ForwardMessage; use TgBotLib\Methods\ForwardMessages; @@ -131,6 +133,7 @@ case DELETE_CHAT_STICKER_SET = 'deleteChatStickerSet'; case GET_FORUM_TOPIC_ICON_STICKERS = 'getForumTopicIconStickers'; case CREATE_FORUM_TOPIC = 'createForumTopic'; + case EDIT_FORUM_TOPIC = 'editForumTopic'; /** * Executes a command on the provided bot with the given parameters. @@ -205,7 +208,8 @@ self::SET_CHAT_STICKER_SET => SetChatStickerSet::execute($bot, $parameters), self::DELETE_CHAT_STICKER_SET => DeleteChatStickerSet::execute($bot, $parameters), self::GET_FORUM_TOPIC_ICON_STICKERS => GetForumTopicIconStickers::execute($bot, $parameters), - self::CREATE_FORUM_TOPIC => CreateChatSubscriptionInviteLink::execute($bot, $parameters), + self::CREATE_FORUM_TOPIC => CreateForumTopic::execute($bot, $parameters), + self::EDIT_FORUM_TOPIC => EditForumTopic::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/EditForumTopic.php b/src/TgBotLib/Methods/EditForumTopic.php new file mode 100644 index 0000000..0b83c2f --- /dev/null +++ b/src/TgBotLib/Methods/EditForumTopic.php @@ -0,0 +1,42 @@ +value, $parameters))); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return [ + 'chat_id', + 'message_thread_id' + ]; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return [ + 'name', + 'icon_custom_emoji_id' + ]; + } + } \ No newline at end of file