diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index 0a72ea3..71658cd 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -76,6 +76,7 @@ use TgBotLib\Methods\SetChatTitle; use TgBotLib\Methods\SetMessageReaction; use TgBotLib\Methods\SetMyCommands; + use TgBotLib\Methods\SetMyName; use TgBotLib\Methods\SetWebhook; use TgBotLib\Methods\UnbanChatMember; use TgBotLib\Methods\UnbanChatSenderChat; @@ -166,6 +167,7 @@ case SET_MY_COMMANDS = 'setMyCommands'; case DELETE_MY_COMMANDS = 'deleteMyCommands'; case GET_MY_COMMANDS = 'getMyCommands'; + case SET_MY_NAME = 'setMyName'; /** * Executes a command on the provided bot with the given parameters. @@ -258,6 +260,7 @@ self::SET_MY_COMMANDS => SetMyCommands::execute($bot, $parameters), self::DELETE_MY_COMMANDS => DeleteMyCommands::execute($bot, $parameters), self::GET_MY_COMMANDS => GetMyCommands::execute($bot, $parameters), + self::SET_MY_NAME => SetMyName::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/SetMyName.php b/src/TgBotLib/Methods/SetMyName.php new file mode 100644 index 0000000..d1cf72e --- /dev/null +++ b/src/TgBotLib/Methods/SetMyName.php @@ -0,0 +1,38 @@ +value, $parameters)); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return null; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return [ + 'name', + 'language_code' + ]; + } + } \ No newline at end of file