This commit is contained in:
Hri7566 2021-04-13 17:48:07 -04:00
parent b31179eee8
commit 17558a12ea
1 changed files with 3 additions and 2 deletions

View File

@ -189,8 +189,9 @@ module.exports = (cl) => {
if (msg.set.name.length > 40) return; if (msg.set.name.length > 40) return;
if(!cl.quotas.userset.attempt()) return; if(!cl.quotas.userset.attempt()) return;
cl.user.name = msg.set.name; cl.user.name = msg.set.name;
let user = new User(cl); let data = Database.getUserData(cl, cl.server);
Database.getUserData().then((usr) => { let user = new User(cl, data);
Database.getUserData(cl, cl.server).then((usr) => {
let dbentry = user.userdb.get(cl.user._id); let dbentry = user.userdb.get(cl.user._id);
if (!dbentry) return; if (!dbentry) return;
dbentry.name = msg.set.name; dbentry.name = msg.set.name;