3
0
Fork 0
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:
Dragory 2025-06-01 20:23:53 +00:00
parent 0f6bbd52df
commit 631bba3d8e
No known key found for this signature in database

View file

@ -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));