This is how Megatron disbands the Decepticons and Sunset offers to teach Megatron about friendship goes in Transformers Prime: Friendship is Magic: Beast Hunters: Predacons Rising.
Optimus Prime: As a being comprised of pure energy, Unicron's Antispark was vulnerable to this reliquary of the Primes.
Smokescreen: But if he's in there, where's--
Starscream: Praise the Allspark! Master! You're alive!
Starscream: Your new battle armor will take things to the next level, My liege. Together we will reunite all Decepticons and once again grind Cybertron under your mighty heel!
Starscream: What? Why?
Megatron: [looks at Optimus and Twilight] Because I now know the true meaning of oppression and have thus lost my taste for inflicting it.
[Everyone is surprised to hear Megatron say that]
Starscream: Uh, you've clearly been traumatized, master. A good power-down and a stroll around the smelting pit will put you back in touch with your inner warlord.
Megatron: Enough! The Decepticons are no more, and that is final.
Sunset Shimmer: Wait! Don't go!
[Megatron turns to her]
Megatron: Why not?
Sunset Shimmer: [steps forward] Because I can teach you about friendship. [holds out her hand to him] Take my hand, Megatron. Let me show you that there is another way. Like someone once did for me.
Megatron: I don't know.
Sunset Shimmer: But if you accept my friendship, you'll be friends and brothers with Optimus again. Please, Megatron.
Megatron: [sighs] For once, Ryan. You are right. [looks at Sunset and extends his hand] I will accept your friendship, Sunset Shimmer.
Starscream: Yes. Well, we all have plenty to think about, don't we?
[Starscream flies to Darkmount]
Starscream: This is not quite how I envisioned my rise to the throne, but since lord Megatron all but surrendered it to me, I will gladly revive the Decepticons in my name. [sees the Predacons and screams] Though perhaps a throne is more befitting of an actual King.
Predaking: I am not here to seize thrones, Starscream but to settle scores.
Megatron: My path has changed while I was under Unicron's influence. So I choose the first option. [takes Sunset's hand]
[Sunset transforms into Daydream Shimmer]
Megatron: Sunset. Let's go to Equestria.
[Megatron transforms to jet mode and flies off with Daydream]