Browse Source

remove Dutch

Markus-Rost 4 years ago
parent
commit
70c22c8b3e
3 changed files with 15 additions and 9 deletions
  1. 5 2
      cmds/test.js
  2. 0 5
      i18n/allLangs.json
  3. 10 2
      main.js

+ 5 - 2
cmds/test.js

@@ -44,8 +44,12 @@ function cmd_test(lang, msg, args, line, wiki) {
 				then = Date.now();
 				then = Date.now();
 				var body = response.body;
 				var body = response.body;
 				if ( body && body.warnings ) log_warn(body.warnings);
 				if ( body && body.warnings ) log_warn(body.warnings);
-				if ( body?.query?.general ) wiki.updateWiki(body.query.general);
 				var ping = ( then - now ).toLocaleString(lang.get('dateformat')) + 'ms';
 				var ping = ( then - now ).toLocaleString(lang.get('dateformat')) + 'ms';
+				if ( body?.query?.general ) {
+					wiki.updateWiki(body.query.general);
+					embed.addField( wiki.toLink(), ping );
+				}
+				else embed.addField( wiki, ping );
 				var notice = [];
 				var notice = [];
 				if ( response.statusCode !== 200 || !body?.query?.general || !body?.query?.extensions ) {
 				if ( response.statusCode !== 200 || !body?.query?.general || !body?.query?.extensions ) {
 					if ( wiki.noWiki(response.url, response.statusCode) ) {
 					if ( wiki.noWiki(response.url, response.statusCode) ) {
@@ -73,7 +77,6 @@ function cmd_test(lang, msg, args, line, wiki) {
 					}
 					}
 				}
 				}
 				else logging(wiki, msg.guild?.id, 'test');
 				else logging(wiki, msg.guild?.id, 'test');
-				embed.addField( wiki, ping );
 				if ( notice.length ) embed.addField( lang.get('test.notice'), notice.join('\n') );
 				if ( notice.length ) embed.addField( lang.get('test.notice'), notice.join('\n') );
 			}, error => {
 			}, error => {
 				then = Date.now();
 				then = Date.now();

+ 0 - 5
i18n/allLangs.json

@@ -8,7 +8,6 @@
 			"fr": "Français (fr)",
 			"fr": "Français (fr)",
 			"hi": "हिन्दी (hi)",
 			"hi": "हिन्दी (hi)",
 			"ko": "한국어 (ko)",
 			"ko": "한국어 (ko)",
-			"nl": "Nederlands (nl)",
 			"pl": "Polski (pl)",
 			"pl": "Polski (pl)",
 			"pt-br": "Português do Brasil (pt-br)",
 			"pt-br": "Português do Brasil (pt-br)",
 			"ru": "Русский (ru)",
 			"ru": "Русский (ru)",
@@ -48,10 +47,6 @@
 			"korean": "ko",
 			"korean": "ko",
 			"한국어": "ko",
 			"한국어": "ko",
 			"한국어 (ko)": "ko",
 			"한국어 (ko)": "ko",
-			"nl": "nl",
-			"dutch": "nl",
-			"nederlands": "nl",
-			"nederlands (nl)": "nl",
 			"pl": "pl",
 			"pl": "pl",
 			"polish": "pl",
 			"polish": "pl",
 			"polski": "pl",
 			"polski": "pl",

+ 10 - 2
main.js

@@ -73,7 +73,11 @@ manager.spawn().then( shards => {
 	}
 	}
 }, error => {
 }, error => {
 	console.error( '- Error while spawning the shards: ' + error );
 	console.error( '- Error while spawning the shards: ' + error );
-	manager.respawnAll();
+	if ( isDebug ) {
+		if ( typeof server !== 'undefined' ) server.kill();
+		process.exit(1);
+	}
+	else manager.respawnAll();
 } );
 } );
 
 
 var server;
 var server;
@@ -265,6 +269,10 @@ if ( process.env.dashboard ) {
 
 
 	dashboard.on( 'exit', (code) => {
 	dashboard.on( 'exit', (code) => {
 		if ( code ) console.log( '- [Dashboard]: Process exited!', code );
 		if ( code ) console.log( '- [Dashboard]: Process exited!', code );
+		if ( isDebug ) {
+			manager.shards.forEach( shard => shard.kill() );
+			process.exit(1);
+		}
 	} );
 	} );
 }
 }
 
 
@@ -293,7 +301,7 @@ function postStats(botList = JSON.parse(process.env.botlist), shardCount = manag
 				return;
 				return;
 			}
 			}
 			for ( let [key, value] of Object.entries(body.failure) ) {
 			for ( let [key, value] of Object.entries(body.failure) ) {
-				console.log( '- ' + value[0] + ': Error while posting statistics to ' + key + ': ' + value[1] );
+				console.log( '- ' + value[0] + ': Error while posting statistics to ' + key + ': ' + value[1]?.substring?.(0, 500) );
 			}
 			}
 		}, error => {
 		}, error => {
 			console.log( '- Error while posting statistics to BotBlock.org: ' + error );
 			console.log( '- Error while posting statistics to BotBlock.org: ' + error );