diff --git a/backend/src/plugins/Logs/util/log.ts b/backend/src/plugins/Logs/util/log.ts index 7499c0c4..14d3da42 100644 --- a/backend/src/plugins/Logs/util/log.ts +++ b/backend/src/plugins/Logs/util/log.ts @@ -43,11 +43,13 @@ export async function log(pluginData: GuildPluginData, type: Log } if (opts.excluded_roles) { - if (data?.message instanceof SavedMessage) { - const member = pluginData.guild.members.get(data.message.user_id); - for (const role of member?.roles || []) { - if (opts.excluded_roles.includes(role)) { - continue logChannelLoop; + for (const value of Object.values(data || {})) { + if (value instanceof SavedMessage) { + const member = pluginData.guild.members.get(data.message.user_id); + for (const role of member?.roles || []) { + if (opts.excluded_roles.includes(role)) { + continue logChannelLoop; + } } } }