-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path速记羽毛笔.js
38 lines (37 loc) · 1.07 KB
/
速记羽毛笔.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"use strict";
const { MediaWikiJS } = require("@lavgup/mediawiki.js");
const bot = new MediaWikiJS(require("./config.json").mzh);
bot.login().then(async () => {
try {
const result0 = await bot.api.get({
action: "query",
prop: "links",
titles: "User talk:鬼影233/唱唱反调",
pllimit: "max",
});
console.log(`共${result0.query.pages[0].links.length}个页面。`);
for (let i = 0; i < result0.query.pages[0].links.length; i++) {
try {
console.log(
`第${i + 1}个页面:${
result0.query.pages[0].links[i].title
}。`
);
const result1 = await bot.doEdit({
title: result0.query.pages[0].links[i].title,
appendtext:
'\n\n{{safesubst:U:鬼影233/唱唱反调}}<span style="display:none;">{{mute|{{safesubst:ROOTPAGENAME}}}} 四月是你的谎言~~~</span>',
summary:
"速记羽毛笔:新一期的《唱唱反调》已送达,请注意查收~",
tags: "Bot",
Bot: true,
});
console.log(result1.edit);
} catch (e1) {
console.error(e1);
}
}
} catch (e0) {
console.error(e0);
}
});