embed fail

This commit is contained in:
Madeline
2022-10-05 16:10:24 +11:00
parent f35c8a1f49
commit c47068b186
+2 -2
View File
@@ -194,7 +194,7 @@ export async function postHandleMessage(message: Message) {
for (const link of links) {
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) {
data.embeds.push(cached.embed);
continue;
@@ -212,7 +212,7 @@ export async function postHandleMessage(message: Message) {
for (var embed of res) {
var cache = EmbedCache.create({
url: `${url.host}${url.pathname}`,
url: link,
embed: embed,
});
cachePromises.push(cache.save());