fix: we put the log in the wrong place
Node.js CI / Lint and Test (push) Successful in 53s

This commit is contained in:
2025-10-07 18:48:30 -07:00
parent b9214d6ff1
commit ea85b7bdcd
+5 -4
View File
@@ -42,10 +42,6 @@ const messageCreate = async(
return; return;
} }
await logger.metric("highlight_triggered", highlights.length, {
guildId: message.guild.id,
});
await Promise.all( await Promise.all(
// eslint-disable-next-line max-lines-per-function -- It's mostly components. // eslint-disable-next-line max-lines-per-function -- It's mostly components.
highlights.map(async(record) => { highlights.map(async(record) => {
@@ -62,6 +58,11 @@ const messageCreate = async(
if (foundWords.length <= 0) { if (foundWords.length <= 0) {
return; return;
} }
await logger.metric("highlight_triggered", foundWords.length, {
serverId: message.guild.id,
userId: record.userId,
words: foundWords.join(", "),
});
const dm = await message.client.users.fetch(record.userId).catch(() => { const dm = await message.client.users.fetch(record.userId).catch(() => {
return null; return null;
}); });