fml
This commit is contained in:
parent
34ea115260
commit
b695c42b98
@ -22,7 +22,7 @@ export default bot => {
|
||||
call: /(vid|img)\.pr0gramm\.com.*/i,
|
||||
set: "uwe",
|
||||
f: e => {
|
||||
const link = "https://"+e.message.match(regex)[0];
|
||||
const link = "https://" + e.message.match(regex)[0];
|
||||
const tmp = url.parse(link).path.substr(1);
|
||||
rp(apis.reverse + tmp)
|
||||
.then(res => {
|
||||
@ -48,7 +48,10 @@ export default bot => {
|
||||
flag: flags[list.flags],
|
||||
user: list.user,
|
||||
comments: item.comments.length,
|
||||
toptags: item.tags.splice(0, 3).map(tag => tag.tag),
|
||||
toptags: item.tags
|
||||
.sort((a, b) => a.confidence - b.confidence)
|
||||
.splice(0, 3)
|
||||
.map(tag => tag.tag),
|
||||
link: site + id.toString()
|
||||
}))
|
||||
.then(meta => [
|
||||
@ -59,19 +62,6 @@ export default bot => {
|
||||
`toptags: ${meta.toptags.join(", ")} (${meta.flag})`
|
||||
])
|
||||
.then(out => e.reply(out.join(" - ")))
|
||||
/*.then(meta => [
|
||||
`c: ${meta.created}`,
|
||||
`u: ${meta.up}`,
|
||||
`d: ${meta.down}`,
|
||||
`s: ${meta.score}`,
|
||||
`r: ${meta.ratio}`,
|
||||
`f: ${meta.flag}`,
|
||||
`u: ${meta.user}`,
|
||||
`co: ${meta.comments}`,
|
||||
`t: ${meta.toptags}`,
|
||||
`l: ${meta.link}`
|
||||
].join("; "))
|
||||
.then(out => e.reply(out))*/
|
||||
).catch(err => e.reply(err));
|
||||
}
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user