add full.pr0gramm.com
This commit is contained in:
parent
3f46d69b39
commit
5ba5ff0afb
|
@ -14,7 +14,7 @@ const flags = {
|
|||
4: "[color=red]nsfl[/color]",
|
||||
8: "[color=blue]nsfp[/color]"
|
||||
};
|
||||
const regex = /(img|vid)\.pr0gramm\.com\/((?:\d+){4}\/(?:\d+){2}(\/(?:\d+){2})?\/(?:\w{1,20})\.(?:webm|png|jpg|mp4|webm)?)/gi;
|
||||
const regex = /(full|img|vid)\.pr0gramm\.com\/((?:\d+){4}\/(?:\d+){2}(\/(?:\d+){2})?\/(?:\w{1,20})\.(?:gif|png|jpg|mp4)?)/gi;
|
||||
const site = "https://pr0gramm.com/new/";
|
||||
|
||||
export default bot => {
|
||||
|
@ -26,9 +26,10 @@ export default bot => {
|
|||
const tmp = url.parse(link).path.substr(1);
|
||||
rp(apis.reverse + tmp)
|
||||
.then(res => {
|
||||
res = JSON.parse(res);
|
||||
if(res.error)
|
||||
throw res.error;
|
||||
return JSON.parse(res).data.id;
|
||||
return res.data.id;
|
||||
})
|
||||
.then(id => Promise.all([
|
||||
rp(apis.pr0gag.list + id.toString()),
|
||||
|
@ -63,7 +64,7 @@ export default bot => {
|
|||
`toptags: ${meta.toptags.join(", ")} (${meta.flag})`
|
||||
])
|
||||
.then(out => e.reply(out.join(" - ")))
|
||||
).catch(err => e.reply("wo pr0gagcrawler jkhsjdhjs"));
|
||||
).catch(err => e.reply(JSON.stringify(err)));
|
||||
}
|
||||
}));
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user