Skip to content

Commit 631bba3

Browse files
committed
fix: crash in member role change logging
1 parent 0f6bbd5 commit 631bba3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/src/plugins/Logs/events/LogsGuildMemberRoleChangeEvt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const LogsGuildMemberRoleChangeEvt = guildPluginEventListener<LogsPluginT
3535
}
3636

3737
const member = await pluginData.guild.members.fetch(auditLogEntry.targetId!);
38-
const mod = await pluginData.client.users.fetch(auditLogEntry.executorId!);
38+
const mod = auditLogEntry.executorId ? await pluginData.client.users.fetch(auditLogEntry.executorId) : null;
3939
for (const change of auditLogEntry.changes) {
4040
if (isRoleAddChange(change)) {
4141
const addedRoles = change.new.map((r) => resolveRole(pluginData.guild, r.id));

0 commit comments

Comments
 (0)