This commit is contained in:
Dragon Fire
2020-06-21 17:40:00 -04:00
parent 40f34e571e
commit b5fbed060a
+3 -1
View File
@@ -57,7 +57,9 @@ module.exports = class ScreenshotCommand extends Command {
async fetchPornList(force = false) {
if (!force && this.pornList) return this.pornList;
const { text } = await request.get('https://raw.githubusercontent.com/blocklistproject/Lists/master/porn.txt');
this.pornList = text.split('\n').filter(url => !url.startsWith('#')).map(url => url.replace(/^(0.0.0.0 )/, ''));
this.pornList = text.split('\n')
.filter(url => url && !url.startsWith('#'))
.map(url => url.replace(/^(0.0.0.0 )/, ''));
return this.postList;
}
};