You did.
discharged without anyone touching it
That would mean a loaded gun was left unattended. The owner/operator would be held liable. They have ignored core gun safety rules.
Yes the manufacturer could be held liable as well but the primary respinsiblility lies with the owner.
The same is true for the driver of the tesla.