fix: disable mention pings in log messages
Node.js CI / CI (push) Successful in 28s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m51s

Add allowedMentions: { parse: [] } to all three log message builders
(activityMessage, modLogMessage, memberMessage) to prevent automated
log entries from accidentally pinging users.

Closes #12
This commit is contained in:
2026-03-25 08:32:43 -07:00
committed by Naomi Carrigan
parent 1c31a49bc4
commit 01d6da8a33
+7 -4
View File
@@ -114,7 +114,8 @@ const modLogMessage = (
source: "Command" | "Audit Log", source: "Command" | "Audit Log",
): Record<string, unknown> => { ): Record<string, unknown> => {
return { return {
components: [ allowedMentions: { parse: [] },
components: [
buildContainer( buildContainer(
"modAction", "modAction",
`## ${title}`, `## ${title}`,
@@ -139,8 +140,9 @@ const activityMessage = (
fields: string, fields: string,
): Record<string, unknown> => { ): Record<string, unknown> => {
return { return {
components: [ buildContainer("info", `## ${emoji} ${title}`, fields) ], allowedMentions: { parse: [] },
flags: MessageFlags.IsComponentsV2, components: [ buildContainer("info", `## ${emoji} ${title}`, fields) ],
flags: MessageFlags.IsComponentsV2,
}; };
}; };
@@ -155,7 +157,8 @@ const memberMessage = (
fields: string, fields: string,
): Record<string, unknown> => { ): Record<string, unknown> => {
return { return {
components: [ allowedMentions: { parse: [] },
components: [
buildContainer( buildContainer(
type === "join" type === "join"
? "join" ? "join"