dist/cache/MemberCache.js
/**
     * Update data of a guild member
     * @param id id of the member
     * @param guildId id of the guild of the member, defaults to the bound guild of the cache
     * @param data updated guild member data
     */
Update data of a guild member
@param id id of the member
@param guildId id of the guild of the member, defaults to the bound guild of the cache
@param data updated guild member data
Update data of a guild member @param id id of the member @param guildId id of the guild of the member defaults to the bound guild of the cache @param data updated guild member data
async update(id, guildId = this.boundGuild, data) {
        var _a;
        if (this.boundObject) {
            this.bindObject(data);
        }
        if (!guildId) {
            throw new Error(`Empty guild id for member ${id}`);
        }
        if (!data.guild_id) {
            data.guild_id = guildId;
        }
        if (!data.id) {
            data.id = id;
        }
        if (data.user) {
            await this.user.update(data.user.id, data.user);
            delete data.user;
        }
        await this.addToIndex(id, guildId);
        await ((_a = this.storageEngine) === null || _a === void 0 ? void 0 : _a.upsert(this.buildId(id, guildId), this.structurize(data)));
        if (this.boundObject)
            return this;
        return new MemberCache(this.storageEngine, this.user.bindUserId(data.id), this.rain, data);
    }
async update ( id , guildId = this . boundGuild , data ) { var _a ; if ( this . boundObject ) { this . bindObject ( data ) ; } if ( ! guildId ) { throw new Error ( ` ${ id } ` ) ; } if ( ! data . guild_id ) { data . guild_id = guildId ; } if ( ! data . id ) { data . id = id ; } if ( data . user ) { await this . user . update ( data . user . id , data . user ) ; delete data . user ; } await this . addToIndex ( id , guildId ) ; await ( ( _a = this . storageEngine ) === null || _a === void 0 ? void 0 : _a . upsert ( this . buildId ( id , guildId ) , this . structurize ( data ) ) ) ; if ( this . boundObject ) return this ; return new MemberCache ( this . storageEngine , this . user . bindUserId ( data . id ) , this . rain , data ) ; }
Update data of a guild member
 @param id id of the member
 @param guildId id of the guild of the member, defaults to the bound guild of the cache
 @param data updated guild member data
Update data of a guild member @param id id of the member @param guildId id of the guild of the member defaults to the bound guild of the cache @param data updated guild member data
// @ts-ignore // @ts-ignore // @ts-ignore // @ts-ignore // @ts-ignore // @ts-ignore // @ts-ignore // @ts-ignore