SpikeHD / AmazonMonitor

Amazon price checker, item monitor and stock monitor, all shoved into a Discord bot
GNU General Public License v3.0
221 stars 38 forks source link

proxy list not working getting error #79

Closed umairriaz90 closed 2 years ago

umairriaz90 commented 2 years ago

SyntaxError: Unexpected token ':' at wrapSafe (internal/modules/cjs/loader.js:988:16) at Module._compile (internal/modules/cjs/loader.js:1036:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10) at Module.load (internal/modules/cjs/loader.js:937:32) at Function.Module._load (internal/modules/cjs/loader.js:778:12) at Module.require (internal/modules/cjs/loader.js:961:19) at require (internal/modules/cjs/helpers.js:92:18) at C:\Users\DELL\Documents\AmazonMonitor-master\index.js:37:17 at Array.forEach () at Client. (C:\Users\DELL\Documents\AmazonMonitor-master\index.js:34:33) (Use node --trace-warnings ... to show where the warning was created) (node:1956) 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:1956) [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.

SpikeHD commented 2 years ago

Did you modify the code at all? There shouldn't be a : on line 34 of index.js at all

umairriaz90 commented 2 years ago

Yes I modified now I got rid of this error, it was including proxy list file as a require file that's why it was giving error. So I excluded it but proxies are still not running while I have given them in the proxy list file.

SpikeHD commented 2 years ago

It should not be requiring the proxylist using require, are you putting the list in the commands folder? Because you should be putting it in the bots root folder.

umairriaz90 commented 2 years ago

I put it in the root folder, it automatically gets copied in the commands folder.

SpikeHD commented 2 years ago

I just created a proxylist.txt and ran the bot, it did not make a copy into commands/, are you sure you didn't put it in there by accident?

umairriaz90 commented 2 years ago

No I downloaded the repo and also ran it, didn't change anything. but I've solved the issue with checking if it's a proxy file then don't require it.

SpikeHD commented 2 years ago

Okay! I should take a look at that further, but for now I'll close this since you've got it working