This is how Defeating the Decepticons goes in More Than Meets The Eye Part 3.
[As the Autobots talk, Twilight writes a friendship report]
Twilight Sparkle: Dear Princess Celestia, I am happy to tell you that our newest friends have learned a very important lesson about friendship. Today, they learned that it's not always teamwork that saves the day, it also invloves friendship and the magic that comes with it. Your faithful former student and fellow princess, Twilight Sparkle.
[Optimus comes over]
Optimus Prime: Ready, Twilight? It's almost time to celebrate.
Twilight Sparkle: [to Optimus] Just a minute, Optimus. [to her friends] At least we won't have to worry about Megatron or his Decepticons anymore.
[Meanwhile, at the bottom of the ocean, the Decepticon warship lays. A hatch opens and Megatron swims to the surface as the episode ends]