diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-08-27 14:13:01 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-08-27 14:13:01 +0800 |
commit | fad4a00aa51bf5cbb2de945c9cd8200c60c97c3a (patch) | |
tree | 5ec6190f552e8c5260f25b88aa467f6ca2a91bcb | |
parent | e296d7d95b1c0f2971827f4bdb3b5c9873ed1456 (diff) | |
download | SoopyV2-fad4a00aa51bf5cbb2de945c9cd8200c60c97c3a.tar.gz SoopyV2-fad4a00aa51bf5cbb2de945c9cd8200c60c97c3a.tar.bz2 SoopyV2-fad4a00aa51bf5cbb2de945c9cd8200c60c97c3a.zip |
bugfixes with guild category
-rw-r--r-- | features/guild/index.js | 4 | ||||
-rw-r--r-- | features/guild/metadata.json | 2 | ||||
-rw-r--r-- | utils/utils.js | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/features/guild/index.js b/features/guild/index.js index 8be193b..73d298b 100644 --- a/features/guild/index.js +++ b/features/guild/index.js @@ -45,8 +45,8 @@ class Guild extends Feature { message = `&2B${this.shortenPrefix.getValue() ? "" : "ridge"} > &7⤷&f ${msg.trim()}` } } else { - if (msg.match(/^@\w+, [\w\W]+[,.]+/)) { - let [_, name2, reply] = msg.match(/^@(\w+?), ([\w\W]+?)[,.]+/) + if (msg.match(/^@\w+, [\w\W]+[,.]+$/)) { + let [_, name2, reply] = msg.match(/^@(\w+?), ([\w\W]+?)[,.]+$/) message = `&2B${this.shortenPrefix.getValue() ? "" : "ridge"} > &b${name2} &7⤷&f ${reply.trim()}` } else { message = `&2G${this.shortenPrefix.getValue() ? "" : "uild"} > ${rank}${ign}${grank || ""}&f: ${msg}` diff --git a/features/guild/metadata.json b/features/guild/metadata.json index a75b3e4..babd19d 100644 --- a/features/guild/metadata.json +++ b/features/guild/metadata.json @@ -3,6 +3,6 @@ "description": "Features nice for guilds, eg bridge formatting", "isHidden": false, "isTogglable": true, - "defaultEnabled": true, + "defaultEnabled": false, "sortA": 1 }
\ No newline at end of file diff --git a/utils/utils.js b/utils/utils.js index 0e916ae..1f6cd6e 100644 --- a/utils/utils.js +++ b/utils/utils.js @@ -130,7 +130,7 @@ let utils = { return c }, ["&" + color]).map(a => { if (a.match(/(?:(?:https?|ftp|file):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$])/igm)) { - return new TextComponent("&" + color + "&n" + a + "&" + color + ' ').setHover("show_text", "Click to open " + a.trim()).setClick("open_url", a.trim()) + return new TextComponent("&" + color + "&n" + a + "&" + color + ' ').setHover("show_text", "Click to open " + a.trim().replace(/^(?:[&§][0-9a-fmn])+|(?:[&§][0-9a-fmn])+$/g, "")).setClick("open_url", a.trim()) } else { return new TextComponent(a + ' ') } |