J.G.
Probably nothing. People are born with set dispositions. Some lean towards the negative, others towards the positive. While environment matters, the disposition is there, and all you can do is teach her how to handle it. Some people have a harder time with frustration. It just is what it is. With that said, a misbehaving child is a child in need. Check out dr. Laura markham and ah ya parenting. The book easy to love, hard to discipline is also really good. It isn't about rewarding good behavior, it's about her feeling unconditionally loved, and then behaving because she loves.
I recently got a book called, what to do when your tempers flare. I also recommend "have you filled a bucket lately." There is this book called "freeing your child from negative thinking" that might be useful too, but check out dr markham and the easy to love book.
In my house, if you're in a bad mood, you have to do something to change it. If you can't change it immediately, then you go off and read and play by yourself until you have the energy to be kind and friendly. People know they can't take their frustration out on the world, they need a better plan to deal with it..and we all start with 5 big breathes.
We also started gratitudes at dinner. This really helped my grumpy 6 year old. When we started, she'd say she'd be grateful for not being grateful. Over a year later-she's 7 now- she always wants to go first. We also do highs and lows of the day...and we acknowledge if anyone did anything nice for us or for someone else they want to acknowledge. I really like doing this stuff with my kids. It has really helped my difficult oldest start being more content and positive.
Instead of telling her what's tolerated, and what's not, discuss what you all value. My kids and I agrees that we value kind words, kind voices, and kind hands. These are principles we agreed to live by because they create a happy peaceful home. And almost every day we ask ourselves if we behaved according to these principles. I let them ask themselves. There is no consequence, just the knowledge that you did something you'd rather not do. I do it with them to, and il acknowledge when I said something mean or used a not so nice tone.
She wants to be happy. Make this about her choice about how she wants to live. Does she want to be grumpy, or joyful? Then figure out how to help her change her approach towards the world. And start by stopping with discipline. She needs loving guidance, and good role models.