Added proper toke and username autocompletion.
This commit is contained in:
parent
23a71a5478
commit
acbe0400c4
7 changed files with 76 additions and 20 deletions
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue