aboutsummaryrefslogtreecommitdiff
path: root/src/features
diff options
context:
space:
mode:
Diffstat (limited to 'src/features')
-rw-r--r--src/features/guild/index.js20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/features/guild/index.js b/src/features/guild/index.js
index d7897c3..3fe0cdb 100644
--- a/src/features/guild/index.js
+++ b/src/features/guild/index.js
@@ -23,7 +23,7 @@ class Guild extends Feature {
//&r&2Guild > &6[MVP&0++&6] zZzSNOW &e[STAFF]&f: &r@niftynathan7, niftynathan7's weight: 20 087 (#1 198) (Skill: 8 771, Slayer: 1 263, Dungeons: 10 053) ,.,,,..,.,,.,,,....,,,,,,,,,..,,,,,..,,,..,,,.,,.,,.,..,,....,,....,,..,.&r
//&r&2Guild > &6[MVP&4++&6] Soopyboo32 &e[STAFF]&f: &rasd&r
//&r&2Guild > &6[MVP&1++&6] niftynathan7 &e[E]&f: &r@Soopyboo32, Soopyboo32's networth: $8 424 131 866 (#2 592) ,..,...,....,.,,,....,,,...,,,,,,,..,,.,,..,,.,.,,,.........,.....,,,,.....,..,,...,.,.,...,.,&r
- let ev = this.registerChat('&r&2Guild > ${player}&f: &r${msg}&r', (player, msg, event) => {
+ let ev = this.registerChat(/^&r&2Guild > ([\w\W]+?)&f: &r([\w\W]+)&r/, (player, msg, event) => {
if (msg.includes("[ITEM:")) return
if (player.includes(":")) return; //stop people sending weard messages to troll using this
@@ -45,9 +45,21 @@ 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]+?)[,.]+$/)
- message = `&2B${this.shortenPrefix.getValue() ? "" : "ridge"} > &b${name2} &7⤷&f ${reply.trim()}`
+ if (msg.match(/^@(\w+?), ([\w\W]+?) \[GBot:([0-9]+)\] [,. ]+$/)) {
+ let [_, name2, reply, gBotId] = msg.match(/^@(\w+?), ([\w\W]+?) \[GBot:([0-9]+)\] [,. ]+$/)
+ fetch("http://soopy.dev/api/botdown/" + gBotId).json().then(m => {
+ let message = new Message(`&2B${this.shortenPrefix.getValue() ? "" : "ridge"} > &b${name2} &7⤷&f `)
+
+ m.forEach(c => {
+ let component = new TextComponent(c.text)
+ if (c.click) component.setClick(c.click.action, c.click.value)
+ if (c.hover) component.setHover(c.hover.action, c.hover.value)
+ message.addTextComponent(component)
+ })
+
+ message.chat()
+ })
+ return
} else {
message = `&2G${this.shortenPrefix.getValue() ? "" : "uild"} > ${rank}${ign}${grank || ""}&f: ${msg}`
}