mirror of
https://github.com/xHyroM/bun-discord-bot.git
synced 2024-12-22 04:01:07 +01:00
fix: don't allow mentions p. 2
This commit is contained in:
parent
6ce4a36feb
commit
4abdefa7a4
3 changed files with 20 additions and 1 deletions
|
@ -86,8 +86,12 @@ export default {
|
|||
|
||||
const result = (await search(query, state, type))[0];
|
||||
if (!result) {
|
||||
// @ts-expect-error allowed_mentions
|
||||
interaction.editReply({
|
||||
content: `❌ Couldn't find issue or pull request \`${query}\``,
|
||||
allowed_mentions: {
|
||||
parse: [],
|
||||
},
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -26,9 +26,13 @@ export default {
|
|||
|
||||
const tag = searchTag(interaction.channel, query, false);
|
||||
if (!tag) {
|
||||
// @ts-expect-error allowed_mentions
|
||||
return interaction.reply({
|
||||
content: `\`❌\` Could not find a tag \`${query}\``,
|
||||
ephemeral: true,
|
||||
allowed_mentions: {
|
||||
parse: [],
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -92,6 +92,7 @@ async function handleGithubLink(message: Message): Promise<void> {
|
|||
|
||||
if (extension === "zig") extension = "rs";
|
||||
|
||||
// @ts-expect-error allowed_mentions
|
||||
message.reply({
|
||||
content: `***${basename(path)}*** — *(L${firstLineNumber + 1}${
|
||||
secondLineNumber ? `-L${secondLineNumber}` : ""
|
||||
|
@ -110,6 +111,9 @@ async function handleGithubLink(message: Message): Promise<void> {
|
|||
/>
|
||||
</ActionRow>,
|
||||
],
|
||||
allowed_mentions: {
|
||||
parse: [],
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -120,7 +124,14 @@ async function handleBunReportLink(message: Message): Promise<void> {
|
|||
if (!match?.[0]) return;
|
||||
|
||||
const data = await getBunReportDetailsInMarkdown(match[0]);
|
||||
message.reply(data);
|
||||
|
||||
// @ts-expect-error allowed_mentions
|
||||
message.reply({
|
||||
content: data,
|
||||
allowed_mentions: {
|
||||
parse: [],
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function handleTwitterLink(message: Message): void {
|
||||
|
|
Loading…
Reference in a new issue