feat(Partials.GuildMember): GuildMemberRemove & Guild#me (#3229)

* use partials for GuildMemberRemove & Guild#me

* oops

* guild.members instead of Action.members

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>
This commit is contained in:
izexi
2019-04-29 17:05:52 +01:00
committed by Amish Shah
parent bc31746621
commit 23191da13d
3 changed files with 13 additions and 2 deletions

View File

@@ -393,7 +393,9 @@ class Guild extends Base {
* @readonly
*/
get me() {
return this.members.get(this.client.user.id) || null;
return this.members.get(this.client.user.id) || (this.client.options.partials.includes(PartialTypes.GUILD_MEMBER) ?
this.members.add({ user: { id: this.client.user.id } }, true) :
null);
}
/**