Browse Source

Update main.js

Markus-Rost 7 năm trước cách đây
mục cha
commit
b0ab1fabda
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      main.js

+ 1 - 1
main.js

@@ -429,7 +429,7 @@ function cmd_link(lang, msg, title, wiki, cmd) {
 							} );
 						}
 						else {
-							msg.channel.send( 'https://' + wiki + '.gamepedia.com/' + encodeURI( Object.values(body.query.pages)[0].title.replace( / /g, '_' ) + ( body.query.redirects && body.query.redirects[0].tofragment ? '#' + body.query.redirects[0].tofragment : '' ) ) );
+							msg.channel.send( 'https://' + wiki + '.gamepedia.com/' + encodeURI( ( Object.values(body.query.pages)[0].title + ( body.query.redirects && body.query.redirects[0].tofragment ? '#' + body.query.redirects[0].tofragment : '' ) ).replace( / /g, '_' ) ) );
 						}
 					}
 					else if ( body.query.interwiki ) {