mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-05 18:27:18 +00:00
fix: crash in member role change logging
This commit is contained in:
parent
0f6bbd52df
commit
631bba3d8e
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ export const LogsGuildMemberRoleChangeEvt = guildPluginEventListener<LogsPluginT
|
|||
}
|
||||
|
||||
const member = await pluginData.guild.members.fetch(auditLogEntry.targetId!);
|
||||
const mod = await pluginData.client.users.fetch(auditLogEntry.executorId!);
|
||||
const mod = auditLogEntry.executorId ? await pluginData.client.users.fetch(auditLogEntry.executorId) : null;
|
||||
for (const change of auditLogEntry.changes) {
|
||||
if (isRoleAddChange(change)) {
|
||||
const addedRoles = change.new.map((r) => resolveRole(pluginData.guild, r.id));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue