How bad did I mess up?

2 year old starts coughing around 11:30 pm,no humidifier in room so I go into put the humidifier and rub her with Vicks. Picked her up to rock her a bit, then placed her in bed. She requires our hand to fall asleep, so I gave her my hand.fast forward to 2:30 AM, she’s singing in bed, no sleep in sight, and I am so tired and a bit nauseous being in the first trimester. Husband comes to relieve me, she starts screaming bloody murder so I feel bad and tell him to go. I kept begging her to sleep and even threatening like if you don’t sleep, mamas leaving. At 3 AM, I realize this is a battle. I take her into an empty bedroom, and have her in my arms. As I pick her up, she’s telling me she’s sad which broke my heart. It’s cuz I was trying to make her sleep in her bed and she didn’t like the arrangement. Again, we sleep together, she’s playing, I tell her to please sleep and I don’t say it very nicely, more like whining/ yelling, “name, please sleep, what’s wrong, does something hurt?” At 5 AM we all fall asleep. Looking back, I should’ve accepted the relief from my husband. And I really really wish that I didn’t threaten her or kind of yell “sleep!” How bad is this? What can I do better