CorwinDev / Discord-Bot

Discord Bot with over 400 commands and made for large servers
MIT License
713 stars 623 forks source link

npm run add-dev <DISCORD_USER_ID> gives error #70

Closed TheForgottenOne5982 closed 1 year ago

TheForgottenOne5982 commented 1 year ago

~/Bot$ npm run add-dev

discordbot@10.0.0 add-dev node src/dev.js ""

[ERROR] >> Developer Badge >> Failed to connect to the database! MongooseError: The uri parameter to openUri() must be a string, got "undefined". Make sure the first parameter to mongoose.connect() or mongoose.createConnection() is a string. at NativeConnection.Connection.openUri (/home/runner/Bot/node_modules/mongoose/lib/connection.js:695:11) at /home/runner/Bot/node_modules/mongoose/lib/index.js:417:10 at /home/runner/Bot/node_modules/mongoose/lib/helpers/promiseOrCallback.js:41:5 at new Promise () at promiseOrCallback (/home/runner/Bot/node_modules/mongoose/lib/helpers/promiseOrCallback.js:40:10) at Mongoose._promiseOrCallback (/home/runner/Bot/node_modules/mongoose/lib/index.js:1270:10) at Mongoose.connect (/home/runner/Bot/node_modules/mongoose/lib/index.js:416:20) at Object. (/home/runner/Bot/src/dev.js:21:10) at Module._compile (node:internal/modules/cjs/loader:1099:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)

I replaced with my discord id but I keep my discord id as anonymous. Pls help @CorwinDev

CorwinDev commented 1 year ago

@TheForgottenOne5982 be sure that you have set your mongo url in .env/secrets

TheForgottenOne5982 commented 1 year ago

@CorwinDev yes ı set up mongo db already