Syntax Explanation

My code reads:
self.socket = socket.socket()
self.socket.connect((self.host, self.port))
self.socket.send(“PASS {}\r\n”.format(self.passwrd).encode(“utf-8”))
self.socket.send(“NICK {}\r\n”.format(self.nick).encode(“utf-8”))
self.socket.send(“JOIN {}\r\n”.format(self.chan).encode(“utf-8”))
So you are saying add:
self.socket.send(“CAP REQ :twitch.tv/membership\r\n”.format().encode(“utf-8”))
before JOIN? and is there anything more to it?
Thank you for the reply!!