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

@ -332,6 +332,13 @@ userSchema.statics.tattooToke = function(tokemap){
//Save the user doc to the database
await userDB.save();
//Would rather do this inside of tokebot but then our boi would have to wait for DB or pass a nasty-looking callback function
//Crawl through active connections
server.channelManager.crawlConnections(userDB.user, (conn)=>{
//Update used toke list
conn.sendUsedTokes(userDB);
});
}
});
}