Hi Roy,
On 12/21/22 15:37, Roy Smith wrote:
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?
I would recommend using mwparserfromhell directly, which makes template manipulation pretty straightforward[1]. AIUI Page.templatesWithParams() is only usable for reading template parameters.
[1] https://github.com/earwig/mwparserfromhell#usage
-- Kunal / Legoktm