Added proper toke and username autocompletion.

This commit is contained in:
rainbow napkin 2025-01-04 11:19:24 -05:00
parent 23a71a5478
commit acbe0400c4
7 changed files with 76 additions and 20 deletions

View file

@ -167,7 +167,7 @@ class chatBox{
this.chatPrompt.focus();
//Grab autocompletion match
const match = this.checkAutocomplete()
const match = this.checkAutocomplete();
//If we have a match
if(match.match != ''){
@ -199,7 +199,7 @@ class chatBox{
//and also directly push it into a shared array :P
for(let cmd of dictionary[set].cmds){
//Append the proper prefix/postfix to the current command
const definition = (`${dictionary[set].prefix}${cmd}${dictionary[set].postfix}`)
const definition = (`${dictionary[set].prefix}${cmd}${dictionary[set].postfix}`);
//if definition starts with the current word
if(word == '' ? false : definition.indexOf(word) == 0){