Updated RSS engine

- Added extended embedBuilder for Emmelia
- Improved RSS embed look
This commit is contained in:
Logan Cusano
2023-02-26 16:04:45 -05:00
parent 2b92b1dc1a
commit 96c10ade61
3 changed files with 30 additions and 19 deletions

View File

@@ -95,7 +95,7 @@ exports.updateFeeds = async (client) => {
if (parsedFeed?.items){
for (const post of parsedFeed.items){
log.VERBOSE("Post from feed: ", post);
//log.VERBOSE("Post from feed: ", post);
if (post.title && post.link && post.content && ( post.postId || post.guid || post.id ) && post.pubDate){
post.postId = post.postId ?? post.guid ?? post.id;
postStorage.getRecordBy('post_guid', post.postId, (err, existingRecord) => {
@@ -103,7 +103,7 @@ exports.updateFeeds = async (client) => {
log.DEBUG("Existing post record: ", existingRecord);
if (!existingRecord){
const channel = client.channels.cache.get(source.channel_id);
libUtils.sendPost(post, channel, (err, sendResults) =>{
libUtils.sendPost(post, source, channel, (err, sendResults) =>{
if (err) throw err;
if (sendResults){