diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index 310c974..3dab696 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -47,6 +47,7 @@ use TgBotLib\Methods\SendVideoNote; use TgBotLib\Methods\SendVoice; use TgBotLib\Methods\SetChatAdministratorCustomTitle; + use TgBotLib\Methods\SetChatDescription; use TgBotLib\Methods\SetChatPermissions; use TgBotLib\Methods\SetChatPhoto; use TgBotLib\Methods\SetChatTitle; @@ -106,6 +107,7 @@ case SET_CHAT_PHOTO = 'setChatPhoto'; case DELETE_CHAT_PHOTO = 'deleteChatPhoto'; case SET_CHAT_TITLE = 'setChatTitle'; + case SET_CHAT_DESCRIPTION = 'setChatDescription'; /** * Executes a command on the provided bot with the given parameters. @@ -168,6 +170,7 @@ self::SET_CHAT_PHOTO => SetChatPhoto::execute($bot, $parameters), self::DELETE_CHAT_PHOTO => DeleteChatPhoto::execute($bot, $parameters), self::SET_CHAT_TITLE => SetChatTitle::execute($bot, $parameters), + self::SET_CHAT_DESCRIPTION => SetChatDescription::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/SetChatDescription.php b/src/TgBotLib/Methods/SetChatDescription.php new file mode 100644 index 0000000..ac9805d --- /dev/null +++ b/src/TgBotLib/Methods/SetChatDescription.php @@ -0,0 +1,39 @@ +value, $parameters)); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return [ + 'chat_id' + ]; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return [ + 'description' + ]; + } + } \ No newline at end of file