diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index bf93d08..afc491a 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -130,6 +130,7 @@ case SET_CHAT_STICKER_SET = 'setChatStickerSet'; case DELETE_CHAT_STICKER_SET = 'deleteChatStickerSet'; case GET_FORUM_TOPIC_ICON_STICKERS = 'getForumTopicIconStickers'; + case CREATE_FORUM_TOPIC = 'createForumTopic'; /** * Executes a command on the provided bot with the given parameters. @@ -204,6 +205,7 @@ 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), }; } } diff --git a/src/TgBotLib/Methods/CreateForumTopic.php b/src/TgBotLib/Methods/CreateForumTopic.php new file mode 100644 index 0000000..f3be292 --- /dev/null +++ b/src/TgBotLib/Methods/CreateForumTopic.php @@ -0,0 +1,42 @@ +value, $parameters))); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return [ + 'chat_id', + 'name' + ]; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return [ + 'icon_color', + 'icon_custom_emoji_id' + ]; + } + } \ No newline at end of file