diff --git a/event/listeners/message.js b/event/listeners/message.js index 163b424..97d02ef 100644 --- a/event/listeners/message.js +++ b/event/listeners/message.js @@ -97,18 +97,6 @@ class messageListener extends Listener { } } - if (text.includes('[embedDesc:')) { - desc = text.split(/(\[embedDesc:.*?])/); - console.log(desc); - for (let i = 0, l = desc.length; i < l; i++) { - if (desc[i].includes('[embedDesc:')) { - desc = desc[i].replace('[embedDesc:', '').slice(0, -1); - console.log(desc); - i = desc.length; - } - } - } - if (text.includes('[embedFooter:')) { footer = text.split(/(\[embedFooter:.*?])/); for (let i = 0, l = footer.length; i < l; i++) { @@ -120,6 +108,17 @@ class messageListener extends Listener { } } + if (text.includes('[embedDesc:')) { + desc = text.split(/(\[embedDesc:.*?])/); + console.log(desc); + for (let i = 0, l = desc.length; i < l; i++) { + if (desc[i].includes('[embedDesc:')) { + desc = desc[i].replace('[embedDesc:', '').slice(0, -1); + i = desc.length; + } + } + } + const embed = new MessageEmbed() .setColor() .setTitle(title)