This commit is contained in:
Cedric Hoelzl 2020-07-02 20:52:41 +02:00
parent ebeca94253
commit 521e7d037c

View File

@ -59,14 +59,15 @@ module.exports = function(rssi){
console.log(entry); console.log(entry);
return db.get_v(entry.chat).then(v=>{ return db.get_v(entry.chat).then(v=>{
console.log(v) console.log(v)
return get_rss(entry.url,v).then(articles=> return get_rss(entry.url,v).then(articles=>{
console.log(articles)
articles.forEach(art=>{ articles.forEach(art=>{
console.log(art.title) console.log(art.title)
return db.set_v(entry.url,parseInt(art.guid)).then(rr=> return db.set_v(entry.url,parseInt(art.guid)).then(rr=>
this.bot.telegram.sendMessage(entry.chat,article_to_mess(art),{"parse_mode":"Markdown"}) this.bot.telegram.sendMessage(entry.chat,article_to_mess(art),{"parse_mode":"Markdown"})
) )
}) })
) })
}) })
})).then(r=>event.reply("Refreshed all Feeds")); })).then(r=>event.reply("Refreshed all Feeds"));
} }