Learn Javascript filter coding?

I want to create a filter in thunderbird and sadly not even Filtaquilla has it ready yet.

WHat I want my filter to do.
I have a folder “ultrascam”. and the average spam folder.

now I want a filter that can be used on the spam folder and that searches for any message in there where the sender also has emails in the ultrascam.
namely if in the ultrascam folder there is an email from “scamlord9000@fap.gz”, then I want to use the filter on the spam folder and have all emails from that guy moved from spam folder to ultraspam folder.

Yeah, basically i wanna remove emails from “blacklisted” people.
since my email provider (gmx) and even thunderbird dont have a proper real blacklist (NOT just putting shit in a certain folder but actually not delivering that shit in the first place if the sender is a known spammer!)
i gotta use this work around.
where basically the ultrascam folder contains emails from spammers so far and i want to sent all incoming messages from these scammers dirctly to that ultrascam folder too.

anyways, i wanna use filtequillas “javascript action with body” thing for this.
jsut got no idea how to program that.
I now javascript but got no idea about those msghdrs and other random vairables that appear out of nowhere in people’s finished codes.
where does this stuff come from, where can I read up about thses things?
filtaquilla says to look for the nsIMsgFilterCustomAction.idl and it’s apply() method.
jsut that that one has no such method.
and no such variables in there.

I dont know where to look, the few existing hints all seem to be out of date.
where can I learn more about this?