From b91b387af9519245f7ad794703c5122afa6a91d3 Mon Sep 17 00:00:00 2001 From: EvanZhouDev Date: Sat, 8 Jul 2023 21:30:45 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=20Fixed=20images?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 3 +-- package.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index fd53e58..f15e19b 100644 --- a/index.js +++ b/index.js @@ -99,7 +99,7 @@ export const queryBard = async (message, ids = {}) => { tag: x[2], url: x[3][0][0], source: { - original: x[0][5].match(/imgurl=([^&%]+)/)[1], + original: x[0][0][0], website: x[1][0][0], name: x[1][1], favicon: x[1][3] @@ -124,7 +124,6 @@ const formatMarkdown = (text, images) => { if (!images) return text; for (let imageData of images) { - // This can be optimized? `[...slice...]` is equal to `original` const formattedTag = `!${imageData.tag}(${imageData.url })`; text = text.replace(new RegExp("(?