Fixed bug in RSS engine
This commit is contained in:
11
libUtils.js
11
libUtils.js
@@ -65,16 +65,17 @@ exports.sendPost = (post, channel, callback) => {
|
||||
const title = post.title;
|
||||
const link = post.link;
|
||||
const content = NodeHtmlMarkdown.translate(post.content);
|
||||
const guid = post.guid;
|
||||
const pubDate = post.pubDate ?? new Date();
|
||||
log.DEBUG("Sending an RSS post to discord", title, guid)
|
||||
const postId = post.postId;
|
||||
const pubDate = new Date(post.pubDate).toISOString() ?? new Date().toISOString();
|
||||
log.DEBUG("Sending an RSS post to discord", title, postId)
|
||||
|
||||
const rssMessage = new EmbedBuilder()
|
||||
.setColor(0x0099FF)
|
||||
.setTitle(title)
|
||||
.setURL(link)
|
||||
.setDescription(content)
|
||||
.setTimestamp(pubDate)
|
||||
.setDescription(`${content}`)
|
||||
.addFields({ name: 'Published', value: pubDate, inline: true })
|
||||
.setTimestamp()
|
||||
.setFooter({ text: 'Brought to you by Emmelia.' });
|
||||
|
||||
try{
|
||||
|
||||
Reference in New Issue
Block a user