Skip to content

Commit f260b76

Browse files
committed
Convert RSS feed handling to Typescript
1 parent 8f02891 commit f260b76

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import log from 'another-logger';
22
import {EventListener} from 'yuuko';
3-
import {NewsChannel} from 'eris';
3+
import {MessageContent, NewsChannel} from 'eris';
44
import Parser from 'rss-parser';
55
const rssParser = new Parser();
66

77
/**
88
* Builds a message content object to use when posting a feed item.
9-
* @param {object} post The parsed feed entry to generate an embed for.
10-
* @param {string} feedURL The URL of the source of the content.
11-
* @returns {object}
9+
* @param post The parsed feed entry to generate an embed for.
10+
* @param feedURL The URL of the source of the content.
1211
*/
1312
function buildRssMessageContent (post, feedURL) {
1413
let tempTitle = post.title;
@@ -18,7 +17,7 @@ function buildRssMessageContent (post, feedURL) {
1817
}
1918

2019
// build embed
21-
const contentObject = {
20+
const contentObject: MessageContent = {
2221
content: post.link,
2322
embed: {
2423
author: {

0 commit comments

Comments
 (0)