From 94f8f629523921251232777752ad1b03f5c9e5d6 Mon Sep 17 00:00:00 2001 From: Supositware Date: Sun, 10 Feb 2019 02:09:42 +0100 Subject: [PATCH] --- event/listeners/message.js | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) 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)