diff --git a/structure/extensions/User.js b/structure/extensions/User.js index 042ef4d..9462362 100644 --- a/structure/extensions/User.js +++ b/structure/extensions/User.js @@ -18,6 +18,14 @@ const User = Structures.extend('User', (User) => { 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;