File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { Mwn } from "mwn" ;
2+ import { MwnMissingPageError } from "mwn/build/error" ;
23import * as dotenv from "dotenv" ;
34import * as fs from "fs" ;
45import * as crypto from "crypto" ;
@@ -28,7 +29,6 @@ type File = {
2829import wikisData from "./data/wikis.json" ;
2930import templatesData from "./data/templates.json" ;
3031import filesData from "./data/files.json" ;
31- import { MwnError } from "mwn/build/error" ;
3232
3333const wikis : Wiki [ ] = wikisData ;
3434const templates : Template [ ] = templatesData ;
@@ -91,7 +91,7 @@ async function updateTemplateOnWiki(wiki: Wiki) {
9191 } ;
9292 } ) ;
9393 } catch ( error ) {
94- if ( error instanceof MwnError . MissingPage ) {
94+ if ( error instanceof MwnMissingPageError ) {
9595 console . log ( `ℹ️ Creating ${ template . pageName } on wiki ${ wiki . apiUrl } ...` ) ;
9696 try {
9797 await bot . create ( template . pageName , content , editSummary ) ;
You can’t perform that action at this time.
0 commit comments