Markus-Rost 6 роки тому
батько
коміт
b52a0233eb
1 змінених файлів з 4 додано та 1 видалено
  1. 4 1
      main.js

+ 4 - 1
main.js

@@ -781,7 +781,7 @@ function cmd_bug(lang, mclang, msg, args, title, cmd) {
 			}, function( error, response, body ) {
 			}, function( error, response, body ) {
 				if ( error || !response || !body || body['status-code'] == 404 ) {
 				if ( error || !response || !body || body['status-code'] == 404 ) {
 					console.log( '- Fehler beim Erhalten der Zusammenfassung' + ( error ? ': ' + error.message : ( body ? ': ' + body.message : '.' ) ) );
 					console.log( '- Fehler beim Erhalten der Zusammenfassung' + ( error ? ': ' + error.message : ( body ? ': ' + body.message : '.' ) ) );
-					if ( body && body['status-code'] == 404 ) msg.react('440871715938238494')
+					if ( body && body['status-code'] == 404 ) msg.react('440871715938238494');
 					else msg.channel.send( 'https://bugs.mojang.com/browse/' + project + args[0] ).then( message => message.react('440871715938238494') );
 					else msg.channel.send( 'https://bugs.mojang.com/browse/' + project + args[0] ).then( message => message.react('440871715938238494') );
 				}
 				}
 				else {
 				else {
@@ -793,6 +793,9 @@ function cmd_bug(lang, mclang, msg, args, title, cmd) {
 							msg.channel.send( mclang.bug.private + '\nhttps://bugs.mojang.com/browse/' + project + args[0] );
 							msg.channel.send( mclang.bug.private + '\nhttps://bugs.mojang.com/browse/' + project + args[0] );
 						}
 						}
 					}
 					}
+					else if ( !body.fields ) {
+						msg.react('440871715938238494');
+					}
 					else {
 					else {
 						msg.channel.send( body.fields.summary + '\nhttps://bugs.mojang.com/browse/' + body.key );
 						msg.channel.send( body.fields.summary + '\nhttps://bugs.mojang.com/browse/' + body.key );
 					}
 					}