From a42e9332409af56eb0ca28df110d2e3e716866f3 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Mon, 18 Oct 2021 20:02:17 -0400 Subject: [PATCH] Send webhook link with required segment --- src/routes/postSkipSegments.ts | 2 +- src/routes/voteOnSponsorTime.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/postSkipSegments.ts b/src/routes/postSkipSegments.ts index 54e2cfb..b3646fd 100644 --- a/src/routes/postSkipSegments.ts +++ b/src/routes/postSkipSegments.ts @@ -83,7 +83,7 @@ async function sendWebhooks(apiVideoInfo: APIVideoInfo, userID: string, videoID: axios.post(config.discordFirstTimeSubmissionsWebhookURL, { "embeds": [{ "title": data?.title, - "url": `https://www.youtube.com/watch?v=${videoID}&t=${(parseInt(startTime.toFixed(0)) - 2)}`, + "url": `https://www.youtube.com/watch?v=${videoID}&t=${(parseInt(startTime.toFixed(0)) - 2)}#requiredSegment=${UUID}`, "description": `Submission ID: ${UUID}\ \n\nTimestamp: \ ${getFormattedTime(startTime)} to ${getFormattedTime(endTime)}\ diff --git a/src/routes/voteOnSponsorTime.ts b/src/routes/voteOnSponsorTime.ts index 2d12115..b3134aa 100644 --- a/src/routes/voteOnSponsorTime.ts +++ b/src/routes/voteOnSponsorTime.ts @@ -114,7 +114,7 @@ async function sendWebhooks(voteData: VoteData) { axios.post(webhookURL, { "embeds": [{ "title": data?.title, - "url": `https://www.youtube.com/watch?v=${submissionInfoRow.videoID}&t=${(submissionInfoRow.startTime.toFixed(0) - 2)}`, + "url": `https://www.youtube.com/watch?v=${submissionInfoRow.videoID}&t=${(submissionInfoRow.startTime.toFixed(0) - 2)}#requiredSegment=${voteData.UUID}`, "description": `**${voteData.row.votes} Votes Prior | \ ${(voteData.row.votes + voteData.incrementAmount - voteData.oldIncrementAmount)} Votes Now | ${voteData.row.views} \ Views**\n\n**Submission ID:** ${voteData.UUID}\