gfycat support
This commit is contained in:
parent
3a83ba5e0b
commit
5ef2574134
|
|
@ -6,7 +6,7 @@ const rp = require('request-promise-native');
|
|||
class Lewd {
|
||||
|
||||
constructor() {
|
||||
this.matches = [ "tits", "ass", "booty", "thicc", "2d" ];
|
||||
this.matches = [ "tits", "ass", "booty", "thicc", "2d", "furry", "sexy", "reddimg" ];
|
||||
}
|
||||
|
||||
async loadSubreddit(name) {
|
||||
|
|
@ -27,8 +27,8 @@ class Lewd {
|
|||
for(let i = 0; i < 10; i++) {
|
||||
let selection = Math.floor(Math.random() * count);
|
||||
let url = srData.data.children[selection].data.url;
|
||||
if(url.endsWith('.jpg') || url.endsWith('.gif') || url.endsWith('.png') || url.endsWith('.jpeg') || url.endsWith('.gifv')) {
|
||||
return url;
|
||||
if(url.endsWith('.jpg') || url.endsWith('.gif') || url.endsWith('.png') || url.endsWith('.jpeg') || url.includes('gfycat.com') ) {
|
||||
return url.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -39,7 +39,11 @@ class Lewd {
|
|||
let rEmbed = new Discord.RichEmbed();
|
||||
let img = await this.getRandomEntry(sub);
|
||||
console.log(img);
|
||||
if(img.includes('gfycat.com')) {
|
||||
return img;
|
||||
} else {
|
||||
rEmbed.setImage(img);
|
||||
}
|
||||
return rEmbed;
|
||||
|
||||
}
|
||||
|
|
@ -54,7 +58,16 @@ class Lewd {
|
|||
chan.send(await this.getRandomRedditImg('thicker+thickthighs+chubby+voluptuous+breedingmaterial'));
|
||||
} else if (msg.content.startsWith('!2d')) {
|
||||
chan.send(await this.getRandomRedditImg('hentai+rule34'));
|
||||
} else if (msg.content.startsWith('!furry')) {
|
||||
chan.send(await this.getRandomRedditImg('furry+yiff'));
|
||||
} else if (msg.content.startsWith('!sexy')) {
|
||||
chan.send(await this.getRandomRedditImg('lingerie+gonemild'));
|
||||
} else if (msg.content.startsWith('!reddimg')) {
|
||||
let contentArr = msg.content.split(" ");
|
||||
if(contentArr.length < 2) return;
|
||||
chan.send(await this.getRandomRedditImg(contentArr[1]));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue