Skip to content

Commit

Permalink
fix: generate command autocomplete for mods correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
vyneer committed Jan 14, 2024
1 parent 91f4264 commit c33bd85
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions assets/chat/js/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,6 @@ class Chat {
),
);

this.commands
.generateAutocomplete(this.user.hasModPowers())
.forEach((command) => this.autocomplete.add(command));
this.autocomplete.bind(this);

// Chat input
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit c33bd85

Please sign in to comment.