src/TgCommands.php
public function chatRename($chat, $newChatName)
    {
        $chat        = $this->escapePeer($chat); //Not escapeStringArgument as chat needs underscores if spaces in name
        $newChatName = $this->escapeStringArgument($newChatName); //Not escapeStringArgument as chat needs underscores if spaces in name

        return $this->exec('rename_chat ' . $chat . ' ' . $newChatName);
    }
public function chatRename($chat, $newChatName)
    {
        $chat        = $this->escapePeer($chat); //Not escapeStringArgument as chat needs underscores if spaces in name
        $newChatName = $this->escapeStringArgument($newChatName); //Not escapeStringArgument as chat needs underscores if spaces in name

        return $this->exec('rename_chat ' . $chat . ' ' . $newChatName);
    }
Rename $chat to $newChatName
@param $chat
@param $newChatName
@return bool|string