mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
fix(GuildAuditLogsEntry): executor can be missing (#5500)
This commit is contained in:
@@ -319,11 +319,13 @@ class GuildAuditLogsEntry {
|
||||
|
||||
/**
|
||||
* The user that executed this entry
|
||||
* @type {User}
|
||||
* @type {?User}
|
||||
*/
|
||||
this.executor = guild.client.options.partials.includes(PartialTypes.USER)
|
||||
? guild.client.users.add({ id: data.user_id })
|
||||
: guild.client.users.cache.get(data.user_id);
|
||||
this.executor = data.user_id
|
||||
? guild.client.options.partials.includes(PartialTypes.USER)
|
||||
? guild.client.users.add({ id: data.user_id })
|
||||
: guild.client.users.cache.get(data.user_id)
|
||||
: null;
|
||||
|
||||
/**
|
||||
* An entry in the audit log representing a specific change.
|
||||
|
||||
Reference in New Issue
Block a user