mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
Fix
This commit is contained in:
@@ -39,13 +39,14 @@ module.exports = class WikipediaCommand extends Command {
|
||||
exintro: '',
|
||||
explaintext: '',
|
||||
pllimit: 15,
|
||||
piprop: 'original',
|
||||
piprop: 'thumbnail',
|
||||
pithumbsize: 1000,
|
||||
redirects: '',
|
||||
formatversion: 2
|
||||
});
|
||||
const data = body.query.pages[0];
|
||||
if (data.missing) return msg.say('Could not find any results.');
|
||||
let thumbnail = data.original ? data.original.source : null;
|
||||
let thumbnail = data.thumbnail ? data.thumbnail.source : null;
|
||||
if (!msg.channel.nsfw && thumbnail) {
|
||||
const img = await request.get(thumbnail);
|
||||
const nsfw = await this.client.tensorflow.isImageNSFW(img.body);
|
||||
|
||||
Reference in New Issue
Block a user