chaun14 / invite-manager-bot

A discord bot that tracks invites and much more. Forked for invitelogger https://invitelogger.me
https://classic.invitelogger.me/
GNU General Public License v3.0
34 stars 23 forks source link

Starting bot throws error #3

Closed j-b-hunter closed 3 years ago

j-b-hunter commented 3 years ago

This is the error: https://i.imgur.com/doBrRew.png Ive set my shards to 0 on the controller.

My devToken is valid, my sql tables are set up correctly but it looks to be forcing the controller token space to be filled.

Once I fill it with the token, the bot loads but doesnt respond to any commands.

chaun14 commented 3 years ago

The token provided for your bot controller isn't valid.

the shard count can't be set to 0 btw, otherwhise no shards will spawn. For a single shard set it to 1

(dev token and controller bot token shouldn't be the same)

j-b-hunter commented 3 years ago

The token provided for your bot controller isn't valid.

the shard count can't be set to 0 btw, otherwhise no shards will spawn. For a single shard set it to 1

(dev token and controller bot token shouldn't be the same)

I also tried setting a new token specifically for the controller, and shards at 1. The bots both load but dont respond to commands.

chaun14 commented 3 years ago

Please send the error when config are set to that.

j-b-hunter commented 3 years ago

There is no error, it just doesnt respond to commands, shows only controller connects

chaun14 commented 3 years ago

So it work well. You need to run the command .startAll with the controller and the bot should start

j-b-hunter commented 3 years ago

Stuck on Shard 1 this is the error

https://i.imgur.com/gYVxZip.png

chaun14 commented 3 years ago

uh try to found the error with the npm run dev command.

chaun14 commented 3 years ago

oh I remember, run the npm run build command and then restart the controller

KiwiTerra commented 3 years ago

I also have this error:

root@nolan:~/invite-manager-bot# npm run dev

discord-invite-manager@9.8.1 dev /root/invite-manager-bot cross-env NODE_ENV=dev node scripts/dev-run.js

Debugger listening on ws://127.0.0.1:44444/5c7917cf-d6ab-40b9-a52f-6f6dc83c3e85 For help, see: https://nodejs.org/en/docs/inspector internal/modules/cjs/loader.js:450 throw e; ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/rest/RequestHandler' is not defined by "exports" in /root/invite-manager-bot/node_modules/eris/package.json at throwExportsNotFound (internal/modules/esm/resolve.js:285:9) at packageExportsResolve (internal/modules/esm/resolve.js:491:3) at resolveExports (internal/modules/cjs/loader.js:444:36) at Function.Module._findPath (internal/modules/cjs/loader.js:484:31) at Function.Module._resolveFilename (internal/modules/cjs/loader.js:818:27) at Function.Module._load (internal/modules/cjs/loader.js:687:27) at Module.require (internal/modules/cjs/loader.js:903:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (/root/invite-manager-bot/bin/framework/RequestHandler.js:5:24) at Module._compile (internal/modules/cjs/loader.js:1015:30) { code: 'ERR_PACKAGE_PATH_NOT_EXPORTED' }

My config file: https://hasteb.in/ifuzidoq.json But build and start scripts are working.

chaun14 commented 3 years ago

Read that: https://github.com/SideProjectGuys/invite-manager-bot/issues/167#issuecomment-684043572

chaun14 commented 3 years ago

(and please open a new issue when you have a non linked problem)

KiwiTerra commented 3 years ago

It's the same error because the shard crash and for fix it, I switch to node v12.16.2

chaun14 commented 3 years ago

It's the same error because the shard crash and for fix it, I switch to node v12.16.2

https://github.com/SideProjectGuys/invite-manager-bot/issues/167#issuecomment-684043572

This command explain the solution of your problem

KiwiTerra commented 3 years ago

I know the solution because it's working now for me.. And you haven't to edit this file, just switch to node 12.16.2

chaun14 commented 3 years ago

yes but in some case it's impossible to switch to node 12.16.2

j-b-hunter commented 3 years ago

oh I remember, run the npm run build command and then restart the controller

Ran the commands you suggested and the shard still crashes.

do I need to do anything about the ports its opening?

chaun14 commented 3 years ago

Try npm run dev

j-b-hunter commented 3 years ago

cross-env NODE_ENV=dev node scripts/dev-run.js

Debugger listening on ws://127.0.0.1:44444/1341bdae-4a19-4ff6-99f0-3deef7d7f3 For help, see: https://nodejs.org/en/docs/inspector internal/modules/cjs/loader.js:438 ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/rest/RequestHandler' is not defined by "exports" in C:\Users\PC\Desktop\invite-manager-bot\node_modules\eris\package.json at throwExportsNotFound (internal/modules/esm/resolve.js:290:9) at packageExportsResolve (internal/modules/esm/resolve.js:513:3) at resolveExports (internal/modules/cjs/loader.js:432:36) at Function.Module._findPath (internal/modules/cjs/loader.js:472:31) at Function.Module._resolveFilename (internal/modules/cjs/loader.js:867:27) at Function.Module._load (internal/modules/cjs/loader.js:725:27) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) at Object. (C:\Users\PC\Desktop\invite-manager-bot\bin\framework\RequestHandler.js:5:24) at Module._compile (internal/modules/cjs/loader.js:1063:30) { code: 'ERR_PACKAGE_PATH_NOT_EXPORTED' }

j-b-hunter commented 3 years ago

node -v v14.15.0

j-b-hunter commented 3 years ago

Changed version to 11 and it all works now...

chaun14 commented 3 years ago

Now try to launch using the sharding controller, npm start and .startAll