From 845b7a5e5196c20326966c978c261c6ab76a80e9 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Wed, 8 May 2024 00:51:08 -0400 Subject: [PATCH] Fix --- commands/search/wikipedia.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/search/wikipedia.js b/commands/search/wikipedia.js index 1108209e..21c4a1d7 100644 --- a/commands/search/wikipedia.js +++ b/commands/search/wikipedia.js @@ -39,14 +39,15 @@ module.exports = class WikipediaCommand extends Command { titles: query, exintro: '', explaintext: '', + piprop: 'original', redirects: '', formatversion: 2 }); const data = body.query.pages[0]; if (data.missing) return msg.say('Could not find any results.'); - let thumbnail = data.thumbnail ? data.thumbnail.source : null; + let thumbnail = data.original ? data.original.source : null; if (!msg.channel.nsfw && thumbnail) { - const img = await request.get(data.thumbnail.source); + const img = await request.get(data.original.source); const nsfw = await this.client.tensorflow.isImageNSFW(img.body); if (nsfw) thumbnail = null; }