synzen / MonitoRSS

MonitoRSS RSS bot (formerly known as Discord.RSS) with customizable feeds. https://monitorss.xyz
https://monitorss.xyz
MIT License
1.08k stars 240 forks source link

Unable to start the bot using provided instructions #173

Closed ghost closed 4 years ago

ghost commented 4 years ago

Describe the bug Software throws the following error on start.

(node:7744) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'error' of undefined
    at Client.login (/home/drawpile/Discord.RSS/node_modules/discord.rss/src/structs/Client.js:78:16)
    at Object.<anonymous> (/home/drawpile/Discord.RSS/server.js:5:6)
    at Module._compile (internal/modules/cjs/loader.js:1236:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1257:10)
    at Module.load (internal/modules/cjs/loader.js:1085:32)
    at Function.Module._load (internal/modules/cjs/loader.js:950:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47
(Use `node --trace-warnings ...` to show where the warning was created)
(node:7744) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:7744) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

To Reproduce Steps to reproduce the behavior:

  1. Install using npm install discord.rss
  2. Generate .js file with own bot token
  3. Attempt to start the bot using node [filename]
  4. See error

Expected behavior Bot should start.

Branch (please specify one): master

Additional context

$ node --version
v14.6.0
$ npm --version
6.14.6
const override = {bot:{prefix:'~'}, database: {uri: './sources'}} // Replace the uri with a mongodb one to use mongoDB for full feat$
const DiscordRSS = require('discord.rss')
const drss = new DiscordRSS.Client(override) // Optional config overrides
drss.login('redacted')
synzen commented 4 years ago

You seem to be referencing the outdated Wiki documentation (which says outdated in big bold letters at the top) - please reference the README on master branch for the quick start (as well as the updated documentation) instead

Though you did make me realize a few outdated references on the quick start so thanks for the report

ghost commented 4 years ago

The README file instructions resulted in an outright crash in the start() method which is why I turned to the outdated wiki.

I missed the -clone repo at first, and I managed to run the instance using it so this issue can be closed now.