escape regex

This commit is contained in:
Neko Life 2021-05-10 14:13:14 +00:00
parent 7213c50113
commit 7e85e06dd8
3 changed files with 4 additions and 4 deletions

View file

@ -29,8 +29,8 @@ module.exports = class mute extends commando.Command {
const modConf = doc?.["moderation"];
const muteConf = modConf?.mute;
const modCase = modConf?.case;
const args = arg.trim().split(/(\-\-)+/, 5);
const mentions = args.shift().split(/,+/);
const args = arg.trim().split(/(?<!\\)(\-\-)+/, 5);
const mentions = args.shift().split(/(?<!\\),+/);
const durationRegExp = /\d+(?![^ymwdhs])[ymwdhs]?o?/gi;
const invokedAt = msg.createdAt;
const duration = {

View file

@ -25,7 +25,7 @@ module.exports = class avatar extends commando.Command {
}
const footerQuote = r?.["settings"]?.defaultEmbed?.footerQuote;
const args = arg.trim().split(/(?<!\\),+/);
const option = arg.trim().split(/(\-\-)+/);
const option = arg.trim().split(/(?<!\\)(\-\-)+/);
let user, avatar, member, show;
let [allEmb, multipleMemMes, dupliCheck] = [[], [], []];
if (!arg) {

View file

@ -19,7 +19,7 @@ module.exports = class embmaker extends commando.Command {
});
}
async run(msg, arg) {
const args = arg.trim().split(/(\-\-)+/);
const args = arg.trim().split(/(?<!\\)(\-\-)+/);
let embed = new MessageEmbed();
let autName, footertext, autIcon, autUrl, footericon, content, channel, editSrc, newAttach = [];
try {