mirror of
https://github.com/xHyroM/bun-discord-bot.git
synced 2024-11-10 01:08: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];
|
const result = (await search(query, state, type))[0];
|
||||||
if (!result) {
|
if (!result) {
|
||||||
|
// @ts-expect-error allowed_mentions
|
||||||
interaction.editReply({
|
interaction.editReply({
|
||||||
content: `❌ Couldn't find issue or pull request \`${query}\``,
|
content: `❌ Couldn't find issue or pull request \`${query}\``,
|
||||||
|
allowed_mentions: {
|
||||||
|
parse: [],
|
||||||
|
},
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,9 +26,13 @@ export default {
|
||||||
|
|
||||||
const tag = searchTag(interaction.channel, query, false);
|
const tag = searchTag(interaction.channel, query, false);
|
||||||
if (!tag) {
|
if (!tag) {
|
||||||
|
// @ts-expect-error allowed_mentions
|
||||||
return interaction.reply({
|
return interaction.reply({
|
||||||
content: `\`❌\` Could not find a tag \`${query}\``,
|
content: `\`❌\` Could not find a tag \`${query}\``,
|
||||||
ephemeral: true,
|
ephemeral: true,
|
||||||
|
allowed_mentions: {
|
||||||
|
parse: [],
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,6 +92,7 @@ async function handleGithubLink(message: Message): Promise<void> {
|
||||||
|
|
||||||
if (extension === "zig") extension = "rs";
|
if (extension === "zig") extension = "rs";
|
||||||
|
|
||||||
|
// @ts-expect-error allowed_mentions
|
||||||
message.reply({
|
message.reply({
|
||||||
content: `***${basename(path)}*** — *(L${firstLineNumber + 1}${
|
content: `***${basename(path)}*** — *(L${firstLineNumber + 1}${
|
||||||
secondLineNumber ? `-L${secondLineNumber}` : ""
|
secondLineNumber ? `-L${secondLineNumber}` : ""
|
||||||
|
@ -110,6 +111,9 @@ async function handleGithubLink(message: Message): Promise<void> {
|
||||||
/>
|
/>
|
||||||
</ActionRow>,
|
</ActionRow>,
|
||||||
],
|
],
|
||||||
|
allowed_mentions: {
|
||||||
|
parse: [],
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +124,14 @@ async function handleBunReportLink(message: Message): Promise<void> {
|
||||||
if (!match?.[0]) return;
|
if (!match?.[0]) return;
|
||||||
|
|
||||||
const data = await getBunReportDetailsInMarkdown(match[0]);
|
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 {
|
function handleTwitterLink(message: Message): void {
|
||||||
|
|
Loading…
Reference in a new issue