Skip to content

Commit

Permalink
fix: generate command autocomplete for mods correctly (#403)
Browse files Browse the repository at this point in the history
* fix: generate command autocomplete for mods correctly

* fix: move autocomplete gen to a better spot
  • Loading branch information
vyneer authored Feb 29, 2024
1 parent ce009c1 commit e7cbd8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/chat/js/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -347,9 +350,6 @@ class Chat {
),
);

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

// Chat input
Expand Down

0 comments on commit e7cbd8d

Please sign in to comment.