fix: add +1 to first line in gh link handler

This commit is contained in:
Jozef Steinhübl 2023-10-19 21:38:39 +02:00
parent b8f0721eb8
commit dc87f7e804
No known key found for this signature in database
GPG key ID: E944BC293F5FF7E7

View file

@ -90,7 +90,7 @@ async function handleGithubLink(message: Message) {
if (extension === "zig") extension = "rs"; if (extension === "zig") extension = "rs";
message.reply({ message.reply({
content: `***${basename(path)}*** — *(L${firstLineNumber}${secondLineNumber ? `-L${secondLineNumber}` : ""})*\n\`\`\`${extension}\n${safeSlice(text, 2000 - 6 - extension.length)}\n\`\`\``, content: `***${basename(path)}*** — *(L${firstLineNumber + 1}${secondLineNumber ? `-L${secondLineNumber}` : ""})*\n\`\`\`${extension}\n${safeSlice(text, 2000 - 6 - extension.length)}\n\`\`\``,
components: [ components: [
new ActionRowBuilder<ButtonBuilder>() new ActionRowBuilder<ButtonBuilder>()
.setComponents( .setComponents(