def send_packet(self, packet: Packet): packet_id: int = packet.id data: bytes = packet.encode() packet_bytes = packets.create_packet(packet_id, data) self.send(packet_bytes)