aboutsummaryrefslogtreecommitdiff
path: root/features/globalSettings/index.js
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-09-08 12:27:27 +0800
committerGitHub <noreply@github.com>2022-09-08 12:27:27 +0800
commit4c21586ce70aa65fa0a70c818f30016ae7bf62a7 (patch)
treeb765ad27152c659ce441a1d98ffd2ef7166d0a39 /features/globalSettings/index.js
parent2ee951ceaa9daebfbbe673b2f96d30b3642a2d69 (diff)
parentd93b1e169f4d1066397a6895834906386b8eea2f (diff)
downloadSoopyV2-4c21586ce70aa65fa0a70c818f30016ae7bf62a7.tar.gz
SoopyV2-4c21586ce70aa65fa0a70c818f30016ae7bf62a7.tar.bz2
SoopyV2-4c21586ce70aa65fa0a70c818f30016ae7bf62a7.zip
Merge pull request #61 from Sapodillay/master
Added warp autocompletes
Diffstat (limited to 'features/globalSettings/index.js')
-rw-r--r--features/globalSettings/index.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js
index e8b86ab..9ffbd36 100644
--- a/features/globalSettings/index.js
+++ b/features/globalSettings/index.js
@@ -141,6 +141,15 @@ class GlobalSettings extends Feature {
}
})
+ this.warps = JSON.parse(FileLib.read("SoopyV2", "features/globalSettings/warps.json"))
+
+ this.registerCommand("warp", (...name) => {
+ //send command to server
+ ChatLib.command("warp " + (name[0] || ""));
+ }, (args) => {
+ return this.warps.filter(v => v.toLowerCase().startsWith(args[0]))
+ })
+
this.registerStep(true, 4, this.mobThings)
this.firstPageSettings = [this.darkTheme]