From dc87f7e8045f4a5065d4099e1c5835daa101d048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20Steinh=C3=BCbl=20=28xHyroM=29?= Date: Thu, 19 Oct 2023 21:38:39 +0200 Subject: [PATCH] fix: add +1 to first line in gh link handler --- src/listeners/message_create.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/listeners/message_create.ts b/src/listeners/message_create.ts index 96f722a..8b4ca09 100644 --- a/src/listeners/message_create.ts +++ b/src/listeners/message_create.ts @@ -90,7 +90,7 @@ async function handleGithubLink(message: Message) { if (extension === "zig") extension = "rs"; 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: [ new ActionRowBuilder() .setComponents(