You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
515 B

  1. const $ = require('jquery');
  2. const request = require('request');
  3. let Parser = require('rss-parser');
  4. let parser = new Parser();
  5. module.exports = {
  6. name: 'get_rss',
  7. description: 'Get rss feed',
  8. async execute(message) {
  9. let feed = await parser.parseURL('https://www.reddit.com/.rss');
  10. console.log(feed.title);
  11. feed.items[0](item => {
  12. message.channel.send(
  13. (item.title + ':' + item.link)
  14. );
  15. });
  16. }
  17. };