embed fail
This commit is contained in:
parent
ca9d09bb22
commit
b2aac3eed7
@ -194,7 +194,7 @@ export async function postHandleMessage(message: Message) {
|
|||||||
for (const link of links) {
|
for (const link of links) {
|
||||||
const url = new URL(link);
|
const url = new URL(link);
|
||||||
|
|
||||||
const cached = await EmbedCache.findOne({ where: { url: `${url.host}${url.pathname}` } });
|
const cached = await EmbedCache.findOne({ where: { url: link } });
|
||||||
if (cached) {
|
if (cached) {
|
||||||
data.embeds.push(cached.embed);
|
data.embeds.push(cached.embed);
|
||||||
continue;
|
continue;
|
||||||
@ -212,7 +212,7 @@ export async function postHandleMessage(message: Message) {
|
|||||||
|
|
||||||
for (var embed of res) {
|
for (var embed of res) {
|
||||||
var cache = EmbedCache.create({
|
var cache = EmbedCache.create({
|
||||||
url: `${url.host}${url.pathname}`,
|
url: link,
|
||||||
embed: embed,
|
embed: embed,
|
||||||
});
|
});
|
||||||
cachePromises.push(cache.save());
|
cachePromises.push(cache.save());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user