dist/cache/UserCache.js
/**
     * Update a user entry in the cache
     * @param id discord id of the user
     * @param data updated data of the user, it will be merged with the old data
     */
Update a user entry in the cache
@param id discord id of the user
@param data updated data of the user, it will be merged with the old data
Update a user entry in the cache @param id discord id of the user @param data updated data of the user it will be merged with the old data
async update(id = (_a = this.boundObject) === null || _a === void 0 ? void 0 : _a.id, data) {
        var _a, _b;
        if (this.boundObject) {
            this.bindObject(data);
        }
        await this.addToIndex(id);
        await ((_b = this.storageEngine) === null || _b === void 0 ? void 0 : _b.upsert(this.buildId(id), this.structurize(data)));
        if (this.boundObject)
            return this;
        return new UserCache(this.storageEngine, this.rain, data);
    }
async update ( id = ( _a = this . boundObject ) === null || _a === void 0 ? void 0 : _a . id , data ) { var _a , _b ; if ( this . boundObject ) { this . bindObject ( data ) ; } await this . addToIndex ( id ) ; await ( ( _b = this . storageEngine ) === null || _b === void 0 ? void 0 : _b . upsert ( this . buildId ( id ) , this . structurize ( data ) ) ) ; if ( this . boundObject ) return this ; return new UserCache ( this . storageEngine , this . rain , data ) ; }
Update a user entry in the cache
 @param id discord id of the user
 @param data updated data of the user, it will be merged with the old data
Update a user entry in the cache @param id discord id of the user @param data updated data of the user it will be merged with the old data