From a7bcf971c419efba7398c5434ea0f91d11553bfc Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Mon, 13 Mar 2023 00:06:39 -0400 Subject: [PATCH] Fixed bug when sending DALL-E images --- libUtils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libUtils.js b/libUtils.js index 2f29023..8f029b2 100644 --- a/libUtils.js +++ b/libUtils.js @@ -88,7 +88,7 @@ exports.sendPost = (post, source, channel, callback) => { // Check for embedded youtube videos and add the first four as links const ytVideos = String(post.content).match(youtubeVideoRegex); if (ytVideos) { - for (const ytVideo of ytVideos.slice(0,4)){ + for (var ytVideo of ytVideos.slice(0,4)){ // If the video is an embed, replace the embed to make it watchable if (ytVideo.includes("embed")) ytVideo = ytVideo.replace("embed/", "watch?v="); postContent += `\nEmbeded Video from Post: [YouTube](${ytVideo})` @@ -147,4 +147,4 @@ exports.sendPost = (post, source, channel, callback) => { exports.returnHash = (...stringsIncluded) => { return crypto.createHash('sha1').update(`${stringsIncluded.join("-<>-")}`).digest("base64"); -} \ No newline at end of file +}