feat: bypass cache check with forceFetch param (#4592)

This commit is contained in:
Carter
2020-08-12 13:23:04 -06:00
committed by GitHub
parent 0225851e40
commit 290938bf80
11 changed files with 84 additions and 45 deletions

View File

@@ -373,10 +373,11 @@ class GuildMember extends Base {
/**
* Fetches this GuildMember.
* @param {boolean} [force=false] Whether to skip the cache check and request the API
* @returns {Promise<GuildMember>}
*/
fetch() {
return this.guild.members.fetch(this.id, true);
fetch(force = false) {
return this.guild.members.fetch({ user: this.id, cache: true, force });
}
/**