Check if the member exists before creating a GuildMember

This commit is contained in:
Samuel Elliott 2018-04-14 15:14:31 +01:00
parent 68e42b8b36
commit a7b300d233
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
1 changed files with 2 additions and 1 deletions

View File

@ -144,7 +144,8 @@ export class Guild {
}
getMember(id) {
return new GuildMember(Modules.GuildMemberStore.getMember(this.id, id));
const member = Modules.GuildMemberStore.getMember(this.id, id);
if (member) return new GuildMember(member, this.id);
}
isMember(id) {