Tory Lanez allegedly opened fire on Megan Thee Stallion because he was wasted -- that's what he claimed in a text sent to her shortly after the bloody incident ... as she was still in a hospital bed.
TMZ has seen the text Megan got on the evening of July 12 ... roughly 15 hours after she claims Tory shot her in her feet, and in it, he's begging for forgiveness. He wrote, "I know u prolly never gone talk to me again, but I genuinely want u to know I'm sorry from the bottom of my heart."
His only explanation for the violence ... "I was just too drunk."
In the text, Tory never references "shooting" or a gun, but it is clear he did something he regrets. In his words, "None the less s**t should have never happened and I can't change what did. I just feel horrible."
And, he repeats ... "Cuz I genuinely just got too drunk."
TMZ broke the story ... Tory, Megan and another friend had been party hopping in the Hollywood Hills early on July 12. Police responded to reports of shots fired from or around an SUV.
When they pulled over Tory's chauffeur-driven ride ... they directed everyone inside to slowly exit the vehicle -- and it was obvious Megan was bleeding from her feet as she gingerly walked backward from the vehicle.
Tory was arrested for possession of a concealed weapon ... a handgun cops say they found under the front passenger seat where he'd been sitting.
Since then Megan has publicly called out Tory ... alleging he is the one who pulled the trigger and shot her in her feet, and she even posted some gruesome pics of her injuries.
Tory has not been arrested or charged for the shooting, but as we first reported, the L.A. County D.A. is considering charging him with felony assault with a firearm.
As for Tory and Megan's contact since the shooting ... we're told she's never responded to his "sorry" text.