This is how Thomas' Train-Prime Training and Airachnid discovers Discord's corruption powers in Battle of the Machine Robos.
[The next morning, Thomas arrives at the Autobot base and transforms into robot mode. He walks up to Optimus Prime]
Thomas: Hello, Optimus.
Optimus Prime: Hello, Thomas. Today, you will be learning the capabilities of a Train-Prime.
Thomas: Wow-wee, I hope I'm up for the task.
Optimus Prime: [chuckles] I'm pretty sure you are.
Thomas: Thanks, Optimus. Let's get to my Train-Prime training.
[Meanwhile, Twilight is telling the story of the Dazzlings to Discord and the Mini-Cons Jetstorm, Slipstream and Fixit]
Fixit: Wow. You're saying the Dazzlings are sirens, right Twilight?
Twilight Sparkle: Yes. They were banished from Equestria a long time ago.
Jetstorm: And those three girls are the same ones who tried to take over Cybertron.
Twilight Sparkle: I know. I remember Optimus telling me.
Ryan F-Freeman: Discord, how did you get your corruption powers?
Matau T. Monkey: Yeah. How did you get them?
Discord: Now I'll tell you Ryan and Matau. You see, I got my corruption powers from one of those spells that Star Swirl the Bearded once preformed.
Matau T. Monkey: What spell did Star Swirl used, Discord?
Discord: It was a hypnosis corruption spell.
Matau T. Monkey: (gets excited) Oh my gosh! That's awesome! I'll go tell Crash and the others.
[Discord and Ryan watched as Matau runs to tell Crash and the gang.]
Discord: Is your apprentice always this excited, Ryan?
Ryan F-Freeman: Matau is sometimes excited. I think he's a bit similar to Pinkie Pie.
[Nearby, Airachnid and the Sirens have overheard]
Airachnid: Did you hear that?
Sonata Dusk: Hear what?
Adagio Dazzle: I think that something about a spell.
Airachnid: Discord said he got his corruption powers from a hypnosis corruption spell that Star Swirl the Bearded used once.
Sonata Dusk: Star Swirl is the one who banished us from Equestria.
Aria Blaze: But how are we going to get that spell?
Airachnid: I think I know just the place. Follow me.
Sonata Dusk: Ok. Let's go.
[Airachnid leads the Sirens to the castle of the royal pony sisters]
Airachnid: Here we are, the Castle of the Two Royal Pony Sisters.
Adagio Dazzle: How are we going to find the spell in there?
Airachnid: [chuckles] Easy. [heads in and the Dazzlings follow her]
[They enter the library where Adagio finds a book with Star Swirl's spells in it]
Adagio Dazzle: I think I found it.
[Adagio gives the book to Airachnid.]
Airachnid: Thanks Adagio, now to find the page where that spell is.
[Airachnid finds the page with the hypnosis corruption spell on it]
Airachnid: Here it is, now for me to try this spell.
[Airachnid performs the spell and gets Discord's corruption powers]
Airachnid: Now all I need is someone to test my new powers on.
Aria Blaze: On who?
Sonata Dusk: Maybe you would test your powers on that red train friend of Thomas.
Airachnid: You know, that's not actually a bad idea.