You need to enter your db (database) credentials before starting the bot

Having issue with mongodb Client. It gave me this error:

(node:10121) 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(). (rejection id: 1340)
You need to enter your db (database) credentials before starting the bot. 
The user is the username with which one you login into your database. 
The password is the password which you need for the authentication 
The host is "localhost" if you run mongodb on your local server. 
The standard port of mongodb is 27017
(node:10121) UnhandledPromiseRejectionWarning: Error [SHARDING_READY_DIED]: Shard 0's process exited before its Client became ready.
    at Shard.onDeath (/rbd/pnpm-volume/e668ade2-831a-4467-9882-3c262b44394a/node_modules/.github.com/discordjs/discord.js/76634db9bec10f52521d77fac970406fa8b3f36a/node_modules/discord.js/src/sharding/Shard.js:155:16)
    at Object.onceWrapper (events.js:277:13)
    at Shard.emit (events.js:189:13)
    at Shard._handleExit (/rbd/pnpm-volume/e668ade2-831a-4467-9882-3c262b44394a/node_modules/.github.com/discordjs/discord.js/76634db9bec10f52521d77fac970406fa8b3f36a/node_modules/discord.js/src/sharding/Shard.js:371:10)
    at ChildProcess.emit (events.js:189:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)

won’t display the code because the code is 6k+ in length. if you wanna see the project the project name is lexy-bot

Without .db properety properly set up in settings.json you ain’t able to start the bot.

if (
  !settings.db ||
  !settings.db.user ||
  !settings.db.password ||
  !settings.db.host ||
  !settings.db.port
) {
  console.error(
    'You need to enter your db (database) credentials before starting the bot. \nThe user is the username with which one you login into your database. \nThe password is the password which you need for the authentication \nThe host is "localhost" if you run mongodb on your local server. \nThe standard port of mongodb is 27017'
  );
  process.exit(42);
}

starting line: 47, file: lexobot.js

You said the host to localhost. You have to set it to the designated server

Got a new error after fixing it

{ MongoServerSelectionError: getaddrinfo ENOTFOUND undefined undefined:27017
    at Timeout.waitQueueMember.timer.setTimeout [as _onTimeout] (/rbd/pnpm-volume/e668ade2-831a-4467-9882-3c262b44394a/node_modules/.registry.npmjs.org/mongodb/3.5.4/node_modules/mongodb/lib/core/sdam/topology.js:428:30)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
  name: 'MongoServerSelectionError',
  reason:
TopologyDescription {
     type: 'Single',
     setName: null,
     maxSetVersion: null,
     maxElectionId: null,
     servers: Map { 'undefined:27017' => [ServerDescription] },
     stale: false,
     compatible: true,
     compatibilityError: null,
     logicalSessionTimeoutMinutes: null,
     heartbeatFrequencyMS: 10000,
     localThresholdMS: 15,
     commonWireVersion: null },
 [Symbol(mongoErrorContextSymbol)]: {} }
{ MongoServerSelectionError: getaddrinfo ENOTFOUND undefined undefined:27017
    at Timeout.waitQueueMember.timer.setTimeout [as _onTimeout] (/rbd/pnpm-volume/e668ade2-831a-4467-9882-3c262b44394a/node_modules/.registry.npmjs.org/mongodb/3.5.4/node_modules/mongodb/lib/core/sdam/topology.js:428:30)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
  name: 'MongoServerSelectionError',
reason:
   TopologyDescription {
     type: 'Single',
     setName: null,
     maxSetVersion: null,
     maxElectionId: null,
     servers: Map { 'undefined:27017' => [ServerDescription] },
     stale: false,
     compatible: true,
     compatibilityError: null,
     logicalSessionTimeoutMinutes: null,
     heartbeatFrequencyMS: 10000,
     localThresholdMS: 15,
     commonWireVersion: null },

You have to give it a hostname. It looks like it’s undefined?

no. I’m trying to connect to cluster but it gave me that err

Oh nvm. I fixed it. i missed something wrong in the code