I'm trying to implement the idea that was suggested in this edit. https://en.wikipedia.org/w/index.php?title=Wikipedia:Bots/Requests_for_approval/DYK-Tools-Bot&diff=prev&oldid=1128662960&diffmode=source
I see how I can find the existing {{DYK-Tools-Bot was here}}, with Page.templatesWithParams(). But once I've got that, how do I actually change the parameters in the wikitext?