From e7cbd8d40bd15a56bc520d9601b610d5bc65206b Mon Sep 17 00:00:00 2001 From: vyneer <41237021+vyneer@users.noreply.github.com> Date: Thu, 29 Feb 2024 22:32:07 +0300 Subject: [PATCH] fix: generate command autocomplete for mods correctly (#403) * fix: generate command autocomplete for mods correctly * fix: move autocomplete gen to a better spot --- assets/chat/js/chat.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/chat/js/chat.js b/assets/chat/js/chat.js index 2e6740b0..790fc5fb 100644 --- a/assets/chat/js/chat.js +++ b/assets/chat/js/chat.js @@ -223,6 +223,9 @@ class Chat { this.user = this.addUser(user); this.authenticated = true; } + this.commands + .generateAutocomplete(this.user.hasModPowers()) + .forEach((command) => this.autocomplete.add(command)); this.setDefaultPlaceholderText(); return this; } @@ -347,9 +350,6 @@ class Chat { ), ); - this.commands - .generateAutocomplete(this.user.hasModPowers()) - .forEach((command) => this.autocomplete.add(command)); this.autocomplete.bind(this); // Chat input