generated from nhcarrigan/template
fix: disable mention pings in log messages
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:
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user