generated from nhcarrigan/template
This commit is contained in:
@@ -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;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user