The bang was the pyrofuse. That fuse protects the battery from excessive current drain if there is a dead short or other electrical fault. The most likely scenario is that a FET in the power inverter failed, which is an integral component of he main drive unit, and shorted the main power rail to ground thus blowing the pyrofuse, which saved the battery from being trashed too. Tesla doesn't do component level repairs on something like that so they will just replace the entire drive unit. Once the pyrofuse blows, the car is bricked.