fix(Action): Don't crash when partials are disabled (#4822)

This commit is contained in:
MrWasdennnoch
2020-09-15 18:35:20 +02:00
committed by GitHub
parent 9c76129a23
commit 8fa3a89482
2 changed files with 5 additions and 1 deletions

View File

@@ -93,7 +93,8 @@ class GenericAction {
if (data.guild_id) {
const guild = this.client.guilds.cache.get(data.guild_id);
if (guild) {
return this.getMember(data.member, guild).user;
const member = this.getMember(data.member, guild);
return member ? member.user : undefined;
}
}
return this.getUser(data);