Error (i set the right user and password but some how it's not just working and i keep getting that.)

Started refreshing application (/) commands.
Successfully reloaded application (/) commands.
Ready!
(node:12008) [MONGODB DRIVER] Warning: useNewUrlParser is a deprecated option: useNewUrlParser has no 
effect since Node.js Driver version 4.0.0 and will be removed in the next major version
(Use `node --trace-warnings ...` to show where the warning was created)
(node:12008) [MONGODB DRIVER] Warning: useUnifiedTopology is a deprecated option: useUnifiedTopology has no effect since Node.js Driver version 4.0.0 and will be removed in the next major version
node:events:492
      throw er; // Unhandled 'error' event
      ^

MongoServerError: bad auth : authentication failed
    at Connection.onMessage (C:\Users\pecan\Downloads\DiscordBot\node_modules\mongoose\node_modules\mongodb\lib\cmap\connection.js:202:26)
    at MessageStream.<anonymous> (C:\Users\pecan\Downloads\DiscordBot\node_modules\mongoose\node_modules\mongodb\lib\cmap\connection.js:61:60)
    at MessageStream.emit (node:events:514:28)
    at processIncomingData (C:\Users\pecan\Downloads\DiscordBot\node_modules\mongoose\node_modules\mongodb\lib\cmap\message_stream.js:124:16)
    at MessageStream._write (C:\Users\pecan\Downloads\DiscordBot\node_modules\mongoose\node_modules\mongodb\lib\cmap\message_stream.js:33:9)
    at writeOrBuffer (node:internal/streams/writable:447:12)
    at _write (node:internal/streams/writable:389:10)
    at Writable.write (node:internal/streams/writable:393:10)
    at TLSSocket.ondata (node:internal/streams/readable:817:22)
    at TLSSocket.emit (node:events:514:28)
Emitted 'error' event on Client instance at:
    at emitUnhandledRejectionOrErr (node:events:397:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:84:21) {
  ok: 0,
  code: 8000,
  codeName: 'AtlasError',
  connectionGeneration: 0,
  [Symbol(errorLabels)]: Set(2) { 'HandshakeError', 'ResetPool' }
}

Node.js v20.9.0

@Cookiehs_N_A something like node.js - Error Message: MongoError: bad auth Authentication failed through URI string - Stack Overflow might help, but if not can you share (1) the version of mongoose being used and (2) the connection string being used? (replace the password with XXX).

Some things to check though:

  1. try copy/pasting the connection string again (see docs)
  2. make sure the user/password you’re using are for the database user for your cluster, not the user/password for accessing Atlas itself