diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index b88ff4b..310c974 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -49,6 +49,7 @@ use TgBotLib\Methods\SetChatAdministratorCustomTitle; use TgBotLib\Methods\SetChatPermissions; use TgBotLib\Methods\SetChatPhoto; + use TgBotLib\Methods\SetChatTitle; use TgBotLib\Methods\SetMessageReaction; use TgBotLib\Methods\SetWebhook; use TgBotLib\Methods\UnbanChatMember; @@ -104,6 +105,7 @@ case DECLINE_CHAT_JOIN_REQUEST = 'declineChatJoinRequest'; case SET_CHAT_PHOTO = 'setChatPhoto'; case DELETE_CHAT_PHOTO = 'deleteChatPhoto'; + case SET_CHAT_TITLE = 'setChatTitle'; /** * Executes a command on the provided bot with the given parameters. @@ -165,6 +167,7 @@ self::DECLINE_CHAT_JOIN_REQUEST => DeclineChatJoinRequest::execute($bot, $parameters), self::SET_CHAT_PHOTO => SetChatPhoto::execute($bot, $parameters), self::DELETE_CHAT_PHOTO => DeleteChatPhoto::execute($bot, $parameters), + self::SET_CHAT_TITLE => SetChatTitle::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/SetChatTitle.php b/src/TgBotLib/Methods/SetChatTitle.php new file mode 100644 index 0000000..aef169a --- /dev/null +++ b/src/TgBotLib/Methods/SetChatTitle.php @@ -0,0 +1,37 @@ +value, $parameters))); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return [ + 'chat_id', + 'title' + ]; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return null; + } + } \ No newline at end of file