From cbcfacc294a8cc36de68e19049f3dd67f77a4b72 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Sun, 19 Jun 2022 14:20:11 +0800 Subject: + /lobbyusers command + error message if set an invalid keybind (doesent just crash) --- features/globalSettings/index.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'features/globalSettings') diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js index 19f5263..e4460b0 100644 --- a/features/globalSettings/index.js +++ b/features/globalSettings/index.js @@ -114,6 +114,16 @@ class GlobalSettings extends Feature { this.registerCommand("lobbyday", () => { ChatLib.chat(this.FeatureManager.messagePrefix + "Current lobby is day " + (World.getTime() / 20 / 60 / 20).toFixed(2)) }) + this.registerCommand("lobbyusers", () => { + fetch("http://soopymc.my.to/api/soopyv2/lobbyusers/" + this.FeatureManager.features["dataLoader"].class.stats.Server).json(data => { + ChatLib.chat("&c" + ChatLib.getChatBreak("-")) + ChatLib.chat(this.FeatureManager.messagePrefix + "&7(" + data.data + ")&r Lobby soopyv2 users:") + data.data.forEach(name => { + ChatLib.chat("&7 - &r" + name) + }) + ChatLib.chat("&c" + ChatLib.getChatBreak("-")) + }) + }) this.lastCookies = 0 @@ -131,8 +141,8 @@ class GlobalSettings extends Feature { this.partyChatEnabled = true - this.registerChat("&r&9Party &8> ${*}", (e)=>{ - if(!this.partyChatEnabled){ + this.registerChat("&r&9Party &8> ${*}", (e) => { + if (!this.partyChatEnabled) { cancel(e) } }) -- cgit