Git Product home page Git Product logo

monitorss's Introduction

MonitoRSS (formerly Discord.RSS)

Delivers highly-customized news feeds to Discord!

Get Started

Use Public Instance

To use the publicly hosted instance for free, visit https://monitorss.xyz!

Self Host

Docker is required to easily coordinate and run multiple services at once.

Note

General knowledge of how Docker, Docker volumes, and docker compose works is highly recommended to avoid accidental data loss

  1. Install Docker Engine
  2. Install Docker Compose
  3. Clone this repo's main (the default) branch - git clone https://github.com/synzen/MonitoRSS.git
  4. Create a Discord application through Discord's developer portal if you do not already have one
  5. Create a copy of the existing .env.example file and rename it to .env.prod
  6. Replace all relevant values in the .env.prod file with your own values
    1. If you have your own MongoDB instance, set BACKEND_API_MONGODB_URI to your MongoDB URI
    2. Replace all instances of "BOT_TOKEN_HERE" with your Discord bot application token
    3. Replace all instances of "BOT_CLIENT_ID_HERE" with your Discord bot application ID
    4. Replace all instances of "BOT_CLIENT_SECRET_HERE" with your Discord bot application secret
    5. Set BACKEND_API_SESSION_SECRET to a random 64-character string
    6. Set BACKEND_API_SESSION_SALT to a random 16-character string
    7. Add http://localhost:8000/api/v1/discord/callback-v2 to the list of redirect URIs in your Discord application in the OAuth2 page
  7. Run docker compose up -d
    • If you run into issues with network timeouts, pass the parallel flag to only build 1 container at once: docker compose --parallel 1 up -d
  8. Access the control panel via http://localhost:8000

Customize Site Domain

  1. Set up your domain to point to the server running the control panel on localhost
  2. Update all references to http://localhost:8000 in your .env.prod to your desired domain. For example, https://mynewdomain.com.
  3. Add {DOMAIN_HERE}/api/v1/discord/callback-v2 to the list of redirect URIs in your Discord application in the OAuth2 page, replacing DOMAIN_HERE with the value you set in step 1

Enable Email Notifications

While email notifications are available so that you may get notified when feeds are disabled for various reasons (permission erorrs, request errors, etc), credentials must be set to be able to send them out. Set the three variables below with your email provider's SMTP settings in your env file:

  • BACKEND_API_SMTP_HOST
  • BACKEND_API_SMTP_USERNAME
  • BACKEND_API_SMTP_PASSWORD
  • BACKEND_API_SMTP_FROM

Make sure to opt into email notifications in the control panel's user settings page afterwards.

Updating

  1. Make a backup of your MongoDB data just in case
  2. Pull the latest files from the main branch
  3. Stop containers with docker compose down
  4. Rebuild containers with docker compose up -d --build

Migrating from v6

If you've been using MonitoRSS v6 (used by the repo https://github.com/synzen/MonitoRSS-Clone), then these are instructions to migrate off of that repo to use the latest changes.

It's recommended that you don't delete your v6 files until you've confirmed that all your feeds are working as expected post-migration.

  1. Follow the instructions above to self host. Be sure to clone this repo - the clone repo is no longer used or maintained.
  2. In your .env.prod file, set BACKEND_API_MONGODB_URI to your MongoDB URI
  3. Run docker compose --parallel 1 up -d --build
    • If you run into issues with network timeouts, pass the parallel flag to only build 1 container at once: docker compose --parallel 1 up -d
  4. Access the control panel via http://localhost:8000/servers and convert all your legacy feeds to personal feeds. Legacy feed articles will not be fetched/delivered until they are converted to personal feeds.
  5. After verifying that all is working as expected, you may delete your v6 files.

monitorss's People

Contributors

andkii avatar chilace avatar dependabot[bot] avatar gintil avatar im-mortal avatar infinitepower18 avatar m417z avatar macleykun avatar netux avatar nevesz avatar nntin avatar sau226 avatar shikhir-arora avatar synzen avatar thelovinator1 avatar trentwiles avatar ultima1252 avatar winstonsung avatar xirpy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

monitorss's Issues

Unable to add Atlassian Confluence feed

Hey,

first of all, many thanks for this cool bot. I added it to my server to subscribe to a Confluence feed (I'm using the free cloud version).

When I try ~rssadd the Confluence feed, all I get is Unable to add <long link>, could not validate as a proper feed. As far as I can tell, Confluence builds the feed on the fly. I do not want to publicly disclose my feed URL, but it looks something like this:

https://somedomain.atlassian.net/wiki/createrssfeed.action?types=page&pageSubTypes=comment&pageSubTypes=attachment&types=blogpost&blogpostSubTypes=comment&blogpostSubTypes=attachment&spaces=conf_all&title=Confluence+RSS+Feed&labelString%3D&excludedSpaceKeys%3D&sort=modified&maxResults=10&timeSpan=5&showContent=true&confirm=Create+RSS+Feed&os_authType=basic

and it returns an Atom XML feed when called in the browser:

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Confluence RSS Feed</title>
  <link rel="alternate" href="https://somedomain.atlassian.net/wiki" />
  <subtitle>Confluence Syndication Feed</subtitle>
  <id>https://somedomain.atlassian.net/wiki</id>
  <entry>
    <title>My Title</title>
    <link rel="alternate" href="https://somedomain.atlassian.net/wiki/display/blub" />
    <author>
      <name>zaha</name>
    </author>
    <id>tag:somedomain.atlassian.net,2009:page-196668-4</id>
    <updated>2017-03-05T09:38:44Z</updated>
    <published>2017-03-05T09:38:44Z</published>
    <summary type="html">html content</summary>
    <dc:creator>zaha</dc:creator>
    <dc:date>2017-03-05T09:38:44Z</dc:date>
  </entry>
</feed>

Do you think it might be possible to get your bot to work with Confluence?
Would be my last hope to get a proper Confluence Discord integration for activity news on my project server. :)

Kind regards
Michael

Bot not online

Hello, I'm using the version hosted by you and it has been offline for the last few days now.

If this was intentional please let me know and I'll start the version on this git in a microserver for just me.

{date} with empty time in RSS feed replaced with current time when posted

Hi,
First of all, gratz on the bot, works like a charm, keep it up like that !

So now, this is more an improvement suggestion.
When you have a RSS feed that has no time given, the bot will always show 02:00 (with HH:mm configured) as time when posting on discord.

Would it be possible that when there is no time given in the RSS feed, that the bot use the time when he's posting the message on discord instead ?

Thank you and again, really great job done with this bot.
(Sorry if it's not the best place to contact you with such "issue" but couldn't find how to contact you otherwise).

Cannot find module needle ( linux mint )

node server.js
module.js:472
throw err;
^

Error: Cannot find module 'needle'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/home/username/Somewhere/request.js:1:78)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)

Issue with images. Space reserved, though no picture

having an issue with images not loading. believe it's a bug/issue with compatibility (on their part). For the latter, feed validation passed, but with reccomendations. Regardless, the images show up in other feed aggregators and I've checked the options, everything seems to be enabled. oddly, the reserved space seems to be there, as if it knew the size of the picture, just not load. Refer to examples for this

Source:
https://forum.warthunder.com/index.php?/forum/26-project-news-read-only.xml

Examples:
https://i.imgur.com/DwthIjq.png
https://i.imgur.com/czx5Ajw.png

Bot doesn't appear online when starting via pm2

Well, starting the bot using pm2 start path/to/Discord.RSS/server.js shows the bot to be running and fine, but it wont became online in my server. Strangely, starting via node /path/to/Discord.RSS/server.js make the bot appear online and fine, but i cant do any command (using default ~ prefix).

And in pm2 the logs only say: 0|Discord. | (node:32571) ExperimentalWarning: The http2 module is an experimental API.

Can you help me? I'm hosting on a rPi 3

Move config.json out of repo for straightforward upgrades

This is minor issue, but manual backup of config every time consumes time, instead I suggest moving config.json to config.json.template, and copy it for usage.

For future upgrades compare it with git diff --no-index -- config.json config.json.template to see the difference

Bot won't run

Hi, it's me again. The bot wont run for me. I get this error:

uwe@baby:/Discord.RSS$ npm install
uwe@baby:
/Discord.RSS$ nodejs server.js
module.js:471
throw err;
^

Error: Cannot find module '/home/uwe/Discord.RSS/node_modules/sqlite3/lib/binding/node-v48-linux-x64/node_sqlite3.node'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/home/uwe/Discord.RSS/node_modules/sqlite3/lib/sqlite3.js:4:15)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
uwe@baby:~/Discord.RSS$

Unresponsive

I've followed each step of the install, configured the bot, twice with 2 branches and a fresh install for each. It starts up and successfully logs in, gives a little speech on starting up correctly, but then it just sits there.

I can see that the bot is logged in on Discord, it even posts it's status just fine. But it's unresponsive to all commands, no matter what I do.

Any pointers? I could be overlooking something, but I can't seem to find anything I've missed in the setup.

New items won't get posted with dev branch

Hi, I noticed that new RSS items fetched when Discord.RSS is launched won't get posted to server's channels on finishing retrieval cycle. Tested that with the commit af18b22 but I'm sure the issue persists through d354edb.
Unless I do rsstest, the bot remains silent.
Thank you for this wonderful bot.

Autostart Function?

it works great with the bot. thank you so much for that. but over the night the bot crashed or shut down? i dont know. will you ever make a autostart function?

Discord Bot Token Reset Due to Potential Abuse

I've received the below message twice in the past hour. I'm unsure what to check.

"It appears your bot has connected to Discord more than 1000 times within a short time period. Since this kind of behavior is usually a result of a bug we have gone ahead and reset your bot's token."

I've already reset the token, but this happened again. I've tried googling, but didn't find much information on it.

Disconnects intermittently - here's the log

Jun 11 01:04:08 moodserver discord-rss[13210]: _sender: [Object],
Jun 11 01:04:08 moodserver discord-rss[13210]: _socket: [Object],
Jun 11 01:04:08 moodserver discord-rss[13210]: _error: null,
Jun 11 01:04:08 moodserver discord-rss[13210]: url: 'wss://gateway.discord.gg/?v=6&encoding=json',
Jun 11 01:04:08 moodserver discord-rss[13210]: _req: null },
Jun 11 01:04:08 moodserver discord-rss[13210]: type: 'error',
Jun 11 01:04:08 moodserver discord-rss[13210]: message: 'read ECONNRESET',
Jun 11 01:04:08 moodserver discord-rss[13210]: error: { Error: read ECONNRESET
Jun 11 01:04:08 moodserver discord-rss[13210]: at _errnoException (util.js:992:11)
Jun 11 01:04:08 moodserver discord-rss[13210]: at TLSWrap.onread (net.js:618:25) code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' } } }

Crashing and or bot disconnecting

the bot will randomly disconnect and will not reconnect with the CMD window open

and sometimes the CMD window it will just randomly disappear as if it was closed

i cant even find a crash log file, only logFeedErrs & logLinkErrs

Bot crashes when server returns response code 520

From time to time, the bot crashes when receiving a weird server response. This 520 is apparently a Cloudflare error, but I haven't been able to pinpoint what feed is causing it, or if it's from Discord itself.
Here's what the logs tells me:

[22:49:51.113] Fatal Error!
 { Error: unexpected server response (520)
    at ClientRequest._req.on (/usr/src/app/node_modules/ws/lib/WebSocket.js:650:26)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:473:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
    at TLSSocket.socketOnData (_http_client.js:362:20)
    at emitOne (events.js:96:13)
    at TLSSocket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at TLSSocket.Readable.push (_stream_readable.js:134:10)
  type: 'error',
  target: 
   WebSocket {
     domain: null,
     _events: 
      { message: [Object],
        open: [Object],
        error: [Object],
        close: [Object] },
     _eventsCount: 4,
     _maxListeners: undefined,
     readyState: 0,
     bytesReceived: 0,
     extensions: {},
     protocol: '',
     _binaryType: 'nodebuffer',
     _finalize: [Function: bound finalize],
     _finalizeCalled: false,
     _closeMessage: null,
     _closeTimer: null,
     _closeCode: null,
     _receiver: null,
     _sender: null,
     _socket: null,
     _ultron: null,
     protocolVersion: 13,
     _isServer: false,
     url: 'wss://gateway.discord.gg/?v=6&encoding=json',
     _req: 
      ClientRequest {
        domain: null,
        _events: [Object],
        _eventsCount: 4,
        _maxListeners: undefined,
        output: [],
        outputEncodings: [],
        outputCallbacks: [],
        outputSize: 0,
        writable: true,
        _last: true,
        upgrading: true,
        chunkedEncoding: false,
        shouldKeepAlive: true,
        useChunkedEncodingByDefault: false,
        sendDate: false,
        _removedHeader: [Object],
        _contentLength: 0,
        _hasBody: true,
        _trailer: '',
        finished: true,
        _headerSent: true,
        socket: [Object],
        connection: [Object],
        _header: 'GET /?v=6&encoding=json HTTP/1.1\r\nSec-WebSocket-Version: 13\r\nSec-WebSocket-Key: dy6oyrGu+0G23xmcG6+v/g==\r\nConnection: Upgrade\r\nUpgrade: websocket\r
\nSec-WebSocket-Extensions: permessage-deflate; client_max_window_bits\r\nHost: gateway.discord.gg\r\n\r\n',
        _headers: [Object],
        _headerNames: [Object],
        _onPendingData: null,
        agent: [Object],
        socketPath: undefined,
        timeout: undefined,
        method: 'GET',
        path: '/?v=6&encoding=json',
        _ended: false,
        parser: [Object],
        res: [Object],
        aborted: 1506120591094 } } }

Tweet feeds issues in sources file

Hi,
First, thanks for this bot !

I've hosted the bot on Heroku as worker to run up 24/7 (free plan)
I'm trying to add Tweet feed to my sources :

"VitalikButerins_tweets": {
"link": "https://queryfeed.net/twitter?q=https%3A%2F%2Ftwitter.com%2FVitalikButerin",
"channel": "403847517520789505",
"message": "{empty}",
"embedMessage": {
"enabled": 1,
"properties": {
"color": 3447003,
"authorTitle": "Vitalik Buterin @VitalikButerin",
"authorAvatarURL": "https://g.twimg.com/dev/img/marketing/twitter-for-websites/header-logo.png",
"thumbnailURL": "https://pbs.twimg.com/profile_images/421617820644810752/rncc5OWi_400x400.jpeg",
"message": "{description}",
"footerText": "{date}"
}
}
}

I dont know what is wrong, but when i've added that source and tried to call any discord's commands in the channel's source, the app crashes all the time saying :
TypeError: Cannot read property 'length' of undefined.

I hope it understandable and you'd help me 😄

Regards

Support for Heroku

Status: on hold

In the near future, when the transition from SQLite/MySQL to mongodb is fully working on stable. These docs can be used to host your selfhosted Discord.RSS. The solution provided is also known as a PaaS solution.

Todo:
x Test selfmade instruction.
x Improve steps so everything can be done trough the git bash/heroku cli.

  • Discuss placement of Procfile. Include in project or rather download?
    x Issue?: not sure if a web worker is created even if procfile is used at first launch. If so, maybe look if project uses a port to contact the outside world. If using a different project's file. The web worker will work withoud dying in 90seconds.

Provided files can be used if you can't wait for it. But only ping Macley#9105 if you get any troubles.
Procfile you need to instert before ever pushing to heroku: https://mega.nz/#!XY43yT6T!8oyAxGGnv7NZ25IgmNYxrPe4kBdNFk_m4DJTfPv8I6U

Raspberry Installation

Hello there,

so i have a raspberry and i m looking how instal on it :

so i do this step :

sudo apt-get update
sudo mkdir /var/www/html/discordRss
cd /var/www/html/discordRss
sudo git clone https://github.com/synzen/Discord.RSS.git

ok and the drama is :


pi@raspberrypi:/var/www/html/discordRss/Discord.RSS $ sudo npm install
npm WARN engine [email protected]: wanted: {"node":">=6.0.0"} (current: {"node":"4.8.2","npm":"1.4.21"})
npm WARN package.json [email protected] license should be a valid SPDX license expression
npm WARN package.json [email protected] No license field.
npm WARN package.json [email protected] string_decoder is also the name of a node core module.

> [email protected] install /var/www/html/discordRss/Discord.RSS/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

/usr/bin/env: « node »: Aucun fichier ou dossier de ce type
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the sqlite3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR!     npm owner ls sqlite3
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 4.14.30-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /var/www/html/discordRss/Discord.RSS
npm ERR! node -v v4.8.2
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
|
> [email protected] install /var/www/html/discordRss/Discord.RSS/node_modules/bufferutil
> prebuild-install || node-gyp rebuild

/usr/bin/env: « node »: Aucun fichier ou dossier de ce type
/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:304:16)
ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
gyp ERR! System Linux 4.14.30-v7+
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /var/www/html/discordRss/Discord.RSS/node_modules/bufferutil
gyp ERR! node -v v4.8.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian


> [email protected] install /var/www/html/discordRss/Discord.RSS/node_modules/uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0


> [email protected] preinstall /var/www/html/discordRss/Discord.RSS/node_modules/sodium
> node install.js --preinstall

sh: 1: node: not found
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian


> [email protected] install /var/www/html/discordRss/Discord.RSS/node_modules/erlpack
> node-gyp rebuild

/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:304:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
gyp ERR! System Linux 4.14.30-v7+
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /var/www/html/discordRss/Discord.RSS/node_modules/erlpack
gyp ERR! node -v v4.8.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian


> [email protected] install /var/www/html/discordRss/Discord.RSS/node_modules/node-opus/node_modules/ogg-packet/node_modules/ref-struct/node_modules/ref
> node-gyp rebuild

/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:304:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
gyp ERR! System Linux 4.14.30-v7+
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /var/www/html/discordRss/Discord.RSS/node_modules/node-opus/node_modules/ogg-packet/node_modules/ref-struct/node_modules/ref
gyp ERR! node -v v4.8.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm WARN optional dep failed, continuing [email protected]

> [email protected] install /var/www/html/discordRss/Discord.RSS/node_modules/node-opus
> node-gyp rebuild

/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:304:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
gyp ERR! System Linux 4.14.30-v7+
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /var/www/html/discordRss/Discord.RSS/node_modules/node-opus
gyp ERR! node -v v4.8.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /var/www/html/discordRss/Discord.RSS/npm-debug.log
npm ERR! not ok code 0

do u now what is wrong please

Bot does not pull new posts from Subreddit RSS posts

Hello, Lovely bot, working great for my RSS stream

I have tried to add a subreddit feed like so:

https://www.reddit.com/r/dubai/.rss

With a custom Embed and all, however, New posts do not trigger the bot

What could be the cause?

Memory leak

There appears to be a memory leak related to the command handler server where it will increase memory usage intermittently, at seemingly arbitrary times (particularly swap space), to the point where there will be no more memory. If the command handler server is disabled, the memory leak appears to be nonexistent.

Will find time to fix this. This only becomes a prevalent issue when fetching a huge number of feeds, otherwise it is practically nonexistent.

What is the correct Redirect URI to pass to Discord's configs

Noob here, just wanting to host the bot in my spare raspberry pi 3, everything is fine execpt i can't invite my bot due to MISSING RETURN URI, but in Setup section of the wiki nothing is said about this.

What is the correct URI to pass, given i dont have any webserver installed on my pi?

RSS subscription limit

This is more of a personal problem, but I would like to be able to subscribe to more than 5 feeds. Perhaps add an option to override the limit.

server.js line18 error on launch

Using a Ubuntu16.04 server install, followed the wiki, and had a few errors with sqlite3, but got past those, but now getting this error on launch. GCC and G++ are installed, and npm install ran OK under sudo.

Any thoughts?

server.js:18
let c = 0
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3

Bot crashes when over 25 feeds

Maybe needs a multipage menu for bots that allow over 25 feeds? Like "rsslist 1" "rsslist 2" etc.

Or maybe I am doing something wrong?

Error:

Fatal Error for Commands Module! Stopping bot: printing error:

RangeError: RichEmbeds may not exceed 25 fields.

File:
node_modules/discord,js/src/structures/RichEmbed.js

Triggered By File:
commands/rsslist.js on line 31

Controller issue

Does This Look Right

  "botSettings": {
    "token": "hidden",
    "enableCommands": true,
    "prefix": "?",
    "defaultGame": "?help",
    "controllerIds": "173449041181409281",
    "menuColor": 7833753,
    "deleteMenus": true
  },

Documentation needed

Hi!

I don't know how I can run the bot, and how I do install dependencies. Is there any quick howto on how to get the bot up and running? :)

Thanks! :)

Discord.RSS could not login (Error: Incorrect login details were provided.)

[19:59:49.327] Error: Disconnected from Discord. Attempting to reconnect after ~0.08333333333333333 minutes.
[19:59:49.331] Discord.RSS could not login (Error: Incorrect login details were provided.), retrying in 60 seconds...
[19:59:54.636] Fatal Error!
Error: Discord.RSS failed to login after 2 attempts.
at Client. (/root/Discord.RSS/server.js:53:47)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at Client.emit (events.js:211:7)
at WebSocketConnection.onClose (/root/Discord.RSS/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:397:19)
at WebSocket.onClose (/root/Discord.RSS/node_modules/ws/lib/EventTarget.js:103:16)
at emitTwo (events.js:126:13)
at WebSocket.emit (events.js:214:7)
at WebSocket.emitClose (/root/Discord.RSS/node_modules/ws/lib/WebSocket.js:213:10)
at _receiver.cleanup (/root/Discord.RSS/node_modules/ws/lib/WebSocket.js:195:41)

Titles in embeds stopped being clickable

Just as the title says, I can no longer click on the title in the embed to open the link. Using Discord.RSS v. 2.1.0.
Example embed json:

...
"random_name": {
      "title": "Unread Content",
      "link": "<rss_url>",
      "channel": "<channel_id>",
      "message": "{empty}",
      "embedMessage": {
        "enabled": 1,
        "properties": {
          "url": "{link}",
          "color": 0,
          "authorTitle": "{title}",
          "authorAvatarURL": "<image_url>",
          "thumbnailURL": "{image1}",
          "message": "{description}",
          "footerText": "Example.com | {date}"
        }
      }
    }
...

It worked before, but the title stopped being clickable around 3 weeks ago.

Add FreeBSD install guide and init script to wiki

Legends:
# = running as root
$ = running as discord-rss user

Install dependencies: (python may need to be added if npm needs to build the sqlite3 module)
# pkg install git npm

Create discord-rss user:
# adduser

Username: discord-rss
Full name:
Uid (Leave empty for default):
Login group [discord-rss]:
Login group is discord-rss. Invite discord-rss into other groups? []:
Login class [default]: daemon
Shell (sh csh tcsh nologin) [sh]: nologin
Home directory [/home/discord-rss]:
Home directory permissions (Leave empty for default):
Use password-based authentication? [yes]: no
Lock out the account after creation? [no]:

Switch to user discord-rss and set HOME:
# su -m discord-rss -c sh
$ HOME=/home/discord-rss

Clone Discord.RSS:
$ cd
$ git clone https://github.com/synzen/Discord.RSS.git

Install node modules:
$ cd Discord.RSS
$ npm install

Edit config.json and anything else needed.

Once satisfied with config, exit shell session and create an rc script this this contents
$ exit
# vi /usr/local/etc/rc.d/discord-rss

#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: discord_rss
# REQUIRE: DAEMON
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf to enable discord_rss:
#
#discord_rss_enable="YES"

. /etc/rc.subr

name="discord_rss"
rcvar="discord_rss_enable"

: ${discord_rss_enable:="NO"}
: ${discord_rss_directory:="/home/discord-rss/Discord.RSS"}

user="discord-rss"
group="discord-rss"

pidfile="/var/run/discord-rss/discord-rss.pid"
command="/usr/sbin/daemon"
command_args="-rSP $pidfile -p $pidfile.child -u $user /usr/local/bin/node ${discord_rss_directory}/server.js"
discord_rss_chdir="$discord_rss_directory"
start_precmd="discord_rss_precmd"

load_rc_config $name

discord_rss_precmd()
{
        if [ ! -d "${pidfile%/?*}" ]; then
                install -d -o "$user" -g "$group" "${pidfile%/?*}"
        fi
}

run_rc_command "$1"

Add discord_rss_enable="YES" to /etc/rc.conf to start Discord.RSS on reboot:
# sysrc discord_rss_enable="YES"

And finally, start Discord.RSS
# service discord-rss start

Stdout and stderr will be redirected to syslog (/var/log/messages). If this is not desired, removing the -S options from command_args and adding -o /path/to/log should work but have not tested.

Enjoy! =]

can yo utell me how to fix this

Discord.RSS-2.1.0/server.js:17
let c = 0
^
SyntaxError: Unexpected identifier
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3

Can't get Images from RSS feed

Hello, Lovely bot thanks for your work

I got it set up and working but i can't seem to be able to get any images from the RSS feed

this is the feed : feeds.feedburner.com/surrenderat20/CqWw

I even tried setting the message to:

{image1} {image2} {image3} {image4} {image5} {image6} {image7} {image8} {image9} {image10} {image11} {image12} {image13} {image14}

And it brings up nothing.

The URL brings only the thumbnail of the site's logo.

Cloudflare Rate Limit

What's the IP of the server that's running this so I can whitelist it on cloudflare?

Due to the requests when adding a lot of feeds at once, it gets flagged by CF.

Feel free to email me: [email protected] if you'd not like it private.

Scaleability issue

From experience in hosting the public version, the bot (or Node itself) has a scaleability issue where it can fails to optimize its requests to a large number of feed links. The current algorithm for handling the links in isolated batches in a forked child process was created months ago (AKA isolated processing method) to handle this issue, however there is an issue of inconsistency (at least on Linux Debian/Ubuntu) where even though it may work for one batch, random batches begins to fail when multiple batches are "queued up" (even though the performance should be identical since it's only ever handling one batch at any time).

The issue has been described in greater detail in https://stackoverflow.com/questions/45950114/inconsistent-request-behavior-in-node-when-requesting-large-number-of-links

If this issue can be resolved for consistent behavior, scaleability for this bot will increase tremendously as it was originally intended. If however someone finds otherwise, please let me know. The current workaround for this was to increase the request timeout

Guild/feeds are removed when server becomes temporarily unavailable

I run this bot on a large server that for whatever reason, regularly disappears from the server sidebar on Discord. Some of the time when this happens, the guild and feed are deleted, and I need to readd them, even after the server reappears.

Logs of event:

[17:57:29.598] RSS Info: Finished default feed retrieval cycle. Cycle Time: 0.07s.
[18:12:29.595] RSS Info: Finished default feed retrieval cycle. Cycle Time: 0.06s.
[18:27:29.593] RSS Info: Finished default feed retrieval cycle. Cycle Time: 0.06s.
[18:41:24.885] Guild "/r/PathofExile" (Users: 37690) has been removed.
[18:41:24.887] RSS Info: Guild profile 174993814845521922.json (/r/PathofExile) deleted from sources folder.
[18:41:49.075] Guild "/r/PathofExile" (Users: 37540) has been added.
[18:42:29.532] RSS Info: Finished default feed retrieval cycle. No feeds to retrieve.
[18:57:29.532] RSS Info: Finished default feed retrieval cycle. No feeds to retrieve.
[19:12:29.532] RSS Info: Finished default feed retrieval cycle. No feeds to retrieve.
[19:27:29.533] RSS Info: Finished default feed retrieval cycle. No feeds to retrieve.

I'm the only one with permissions on the bot, and no commands were issued during this range.
This output is created in https://github.com/synzen/Discord.RSS/blob/master/events/guildDelete.js , and is being called from the listener file, at https://github.com/synzen/Discord.RSS/blob/master/util/listeners.js#L24

I've temporarily solved the problem by making the json config file for the server unremovable by the user account running the bot, but this probably should be fixed.

When running the bot on many servers, perhaps as a public bot, this behavior makes sense, when a server is deleted or the bot kicked, removing the RSS feed makes sense. However, Discord servers simply are unavailable for minutes at a time, even an hour in extreme cases. There should be some sort of delay on the bot side that prevents this, I'm not sure what though.

npm install discord.rss error ENOSELF

`
npm ERR! Linux 4.15.0-24-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "discord.rss"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code ENOSELF

npm ERR! Refusing to install discord.rss as a dependency of itself
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! /root/rss/npm-debug.log
root@vps561467:~/rss#
`

Unicode isn't supported

Hello,

I noticed on some of the RSS feeds i'm following that some symbols out of the ASCII scope doesn't display properly. Here is in example below:

capture

This error occurs both on windows and linux desktop apps.

If you're currently too busy to deal with this issue, please feel free to indicate me which files i should look into where RSS feeds are retrieved, formatted and finally posted in server's channels, so i can make a pull request fixing this.

How to host Discord.RSS in Heroku!

How to deploy to Heroku the new way!

Pre-requirements

  1. A Heroku account.
  2. Have all the credentials you need ready!

Instruction

  1. Go to the repo and use the purple looking button to deploy directly to Heroku!
  2. Fill in all the details, if you want to host the web dashboard, make sure to also do the following:
  • DRSS_WEB_CLIENT_ID
  • Get the CLIENT_ID by going here. It should look like: 343394333935336303.
  • RSS_WEB_CLIENT_SECRET
  • On the same page, copy the client secret.
  • DRSS_WEB_ENABLED
  • Set this to true. To enable the web part.
  • DRSS_WEB_REDIRECT_URI
  • Given the name you want to give to your app, make sure to replace APPNAME with yours! https://APPNAME.herokuapp.com/authorize. If you decide to use a domain, change the APPNAME.herokuapp.com to your domain name.
    *Given my appname: d-discordrss. With my domain: drss.meetdelta.com. I configured it as followed:
    Example redirect uri's
  • Do note that i added way to many, if you get into any problem, suggest to use both appname and domain name, in both http and https format.
  1. Now hit deploy and go to Resources. Turn off Worker and turn on Web. If you now click on Open app, you should see your own dashboard!
  2. Now, to keep Discord.rss up, it's recomanded to use uptimerobot. It's easy to use and even mails you when your bot goes down! When this happens just give it a few moments or reboot it by turning the switch off and on again!
  3. Given that you deployed with the button, you can choose to fork the repo, and to connect from Heroku to your app.
    How to connect Github fork to Heroku app
  4. Now, make sure to keep your fork up to date, you can use this project to do this automatically for you! You can set these env variables in the settings tab your Heroku app. You can add the script to the root of your forked repo. The changes should emmediatly trigger a push and build to your app.
  5. When that's set, go into your Heroku app to overview, and add the Heroku Scheduler. Configure it with the following: bash ./update.sh you can set the time to whatever you want.

That's it, not only haven't you installed any software, but your app will auto-update with the new dashboard working natively with Heroku!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.