diff --git a/src/commands/docs.tsx b/src/commands/docs.tsx index d723742..15a9278 100644 --- a/src/commands/docs.tsx +++ b/src/commands/docs.tsx @@ -75,11 +75,12 @@ export default { : "", ].join("\n"); + // @ts-expect-error allowed_mentions await interaction.editReply({ content, - // allowedMentions: { - // parse: ["users"], - // } + allowed_mentions: { + parse: target ? ["users"] : [], + }, }); }, } satisfies ApplicationCommand; diff --git a/src/commands/github.tsx b/src/commands/github.tsx index 0d0f3d7..d97c2d1 100644 --- a/src/commands/github.tsx +++ b/src/commands/github.tsx @@ -92,6 +92,7 @@ export default { return; } + // @ts-expect-error allowed_mentions interaction.editReply({ content: [ `${result.emoji.type} ${result.emoji.state} [#${ @@ -101,6 +102,9 @@ export default { }>) ${stateToText(result)} ${stateToTimestamp(result)}`, result.title, ].join("\n"), + allowed_mentions: { + parse: [], + }, }); }, diff --git a/src/commands/mdn.tsx b/src/commands/mdn.tsx index a640c57..3ccf635 100644 --- a/src/commands/mdn.tsx +++ b/src/commands/mdn.tsx @@ -101,11 +101,15 @@ export default { intro, ]; + // @ts-expect-error allowed_mentions await interaction.editReply({ content: [ target ? `*Suggestion for <@${target}>:*\n` : "", parts.join("\n"), ].join("\n"), + allowed_mentions: { + parse: target ? ["users"] : [], + }, }); }, autocomplete: async (interaction) => { diff --git a/src/commands/tag.tsx b/src/commands/tag.tsx index 24f6b1d..969dd97 100644 --- a/src/commands/tag.tsx +++ b/src/commands/tag.tsx @@ -32,15 +32,16 @@ export default { }); } + // @ts-expect-error allowed_mentions await interaction.reply({ content: [ target ? `*Suggestion for <@${target}>:*\n` : "", `**${tag.question}**`, tag.answer, ].join("\n"), - // allowedMentions: { - // parse: ["users"] - // } + allowed_mentions: { + parse: target ? ["users"] : [], + }, }); }, autocomplete: async (interaction) => { diff --git a/src/message-commands/tag.ts b/src/message-commands/tag.ts index 976c6d2..b0e7ac3 100644 --- a/src/message-commands/tag.ts +++ b/src/message-commands/tag.ts @@ -13,20 +13,25 @@ export default { const tag = searchTag(await message.fetchChannel(), keyword, false); if (!keyword || !tag) { + // @ts-expect-error allowed_mentions return message.reply({ content: `\`❌\` Could not find a tag \`${keyword}\``, + allowed_mentions: { + parse: [], + }, }); } + // @ts-expect-error allowed_mentions message.reply({ content: [ resolvedTarget ? `*Suggestion for <@${resolvedTarget.id}>:*\n` : "", `**${tag.question}**`, tag.answer, ].join("\n"), - // allowedMentions: { - // parse: ["users"] - // } + allowed_mentions: { + parse: resolvedTarget ? ["users"] : [], + }, }); }, } satisfies MessageCommand;