|
@@ -1283,11 +1283,11 @@ String.prototype.toMarkdown = function(wiki, title = '') {
|
|
|
var page = title.toTitle(true) + '#' + link[1].toSection();
|
|
|
text = text.replace( link[0], '[→](https://' + wiki + '.gamepedia.com/' + page + ')' + link[1] + ( link[2] ? ': ' + link[2] : '' ) );
|
|
|
}
|
|
|
- return text.replace( /(`|_|\*|~|<|>|{|})/g, '\\$1' );
|
|
|
+ return text.replace( /(`|_|\*|~|<|>|{|}|\/)/g, '\\$1' );
|
|
|
};
|
|
|
|
|
|
String.prototype.toPlaintext = function() {
|
|
|
- return this.replace( /\[\[(?:[^\|\]]+\|)?([^\]]+)\]\]/g, '$1' ).replace( /\/\*\s*([^\*]+?)\s*\*\//g, '→$1:' ).replace( /(`|_|\*|~|<|>|{|})/g, '\\$1' );
|
|
|
+ return this.replace( /\[\[(?:[^\|\]]+\|)?([^\]]+)\]\]/g, '$1' ).replace( /\/\*\s*([^\*]+?)\s*\*\//g, '→$1:' ).replace( /(`|_|\*|~|<|>|{|}|\/)/g, '\\$1' );
|
|
|
};
|
|
|
|
|
|
Discord.Message.prototype.reactEmoji = function(name) {
|
|
@@ -1400,8 +1400,9 @@ client.on( 'message', msg => {
|
|
|
} );
|
|
|
}
|
|
|
} else if ( msg.isAdmin() || msg.isOwner() ) {
|
|
|
- console.log( msg.guild.name + ': Fehlende Berechtigungen - ' + permissions.missing(['SEND_MESSAGES','ADD_REACTIONS','USE_EXTERNAL_EMOJIS','READ_MESSAGE_HISTORY']) );
|
|
|
- if ( permissions.has(['SEND_MESSAGES']) ) msg.replyMsg( lang.missingperm + ' `' + permissions.missing(['ADD_REACTIONS','USE_EXTERNAL_EMOJIS','READ_MESSAGE_HISTORY']).join('`, `') + '`' );
|
|
|
+ var missing = permissions.missing(['SEND_MESSAGES','ADD_REACTIONS','USE_EXTERNAL_EMOJIS','READ_MESSAGE_HISTORY']);
|
|
|
+ console.log( msg.guild.name + ': Fehlende Berechtigungen - ' + missing.join(', ') );
|
|
|
+ if ( !missing.includes( 'SEND_MESSAGES' ) ) msg.replyMsg( lang.missingperm + ' `' + missing.join('`, `') + '`' );
|
|
|
}
|
|
|
} );
|
|
|
|