From c33bd85969616eed98043eb07a4c3e879b04d0c2 Mon Sep 17 00:00:00 2001 From: vyneer Date: Sun, 14 Jan 2024 23:00:24 +0300 Subject: [PATCH] fix: generate command autocomplete for mods correctly --- assets/chat/js/chat.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/assets/chat/js/chat.js b/assets/chat/js/chat.js index 2411c67c..3991c6a9 100644 --- a/assets/chat/js/chat.js +++ b/assets/chat/js/chat.js @@ -346,9 +346,6 @@ class Chat { ), ); - this.commands - .generateAutocomplete(this.user.hasModPowers()) - .forEach((command) => this.autocomplete.add(command)); this.autocomplete.bind(this); // Chat input @@ -683,6 +680,11 @@ class Chat { $(document.body).toggleClass(`pref-fontscale`, fontscale !== 'auto'); $(document.body).attr('data-fontscale', fontscale); + // Add command autocomplete + this.commands + .generateAutocomplete(this.user.hasModPowers()) + .forEach((command) => this.autocomplete.add(command)); + for (const window of this.windows.values()) { window.updateMessages(this); }