forked from Galactic/galactic-bot
fetch settings
This commit is contained in:
parent
e05ebb9b62
commit
b393478796
@ -18,6 +18,14 @@ const User = Structures.extend('User', (User) => {
|
|||||||
return Date.now()-this._cached;
|
return Date.now()-this._cached;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async settings() {
|
||||||
|
|
||||||
|
if (!this._settings) this._settings = this.client.transactionHandler._send({ provider: 'mongodb', request: { collection: 'user_settings', type: 'findOne', query: { user: this.id } } });
|
||||||
|
if (this._settings instanceof Promise) this._settings = await this._settings || {};
|
||||||
|
return this._settings;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ExtendedUser;
|
return ExtendedUser;
|
||||||
|
Loading…
Reference in New Issue
Block a user