Connect to Database + Daily Command | Economy Discord Bot đŸ€– (Discord.js v14)

SdĂ­let
VloĆŸit
  • čas pƙidĂĄn 7. 09. 2024

Komentáƙe • 26

  • @였예넌가임한였핎

    I encountered this error:
    error handling /daily: MongooseError: Operation `userprofiles.findOne()` buffering timed out after 10000ms
    How to fix it?

  • @gfrinc.gamingguitar6667
    @gfrinc.gamingguitar6667 Pƙed 24 dny

    im getting an error as well error: -4058 code: 'enoit' syscall: 'scandir'

  • @koushikgamer8185
    @koushikgamer8185 Pƙed rokem +1

    Finally wait is over!!!

  • @saranicole509
    @saranicole509 Pƙed rokem +1

    i dont know what im doing wrong D: i keep getting "Error handling /daily: ValidationError: balance: Cast to Number failed for value "NaN" (type number) at path "balance"." and when i do /daily in the server with the bot it just says the bot is thinking.

    • @mael.916
      @mael.916 Pƙed rokem +1

      I dont have this error but my bot is thinking. if you can help us. thanks!

  • @insypher
    @insypher Pƙed rokem +2

    Lovely content!

  • @gavin5104
    @gavin5104 Pƙed rokem +4

    To anyone having an issue with the async function at 4:59 chat gpt created this lovely fix
    const connectToDB = async () => {
    await mongoose.connect(process.env.MONGODB_URI);
    console.log('Connected to the DB');
    };
    const loginToClient = async () => {
    await client.login(process.env.TOKEN);
    };
    (async () => {
    try {
    await Promise.all([
    connectToDB(),
    loginToClient(),
    ]);
    console.log('Initialization complete!');
    } catch (error) {
    console.error('Initialization failed:', error);
    }
    })();

  • @rbxcam7302
    @rbxcam7302 Pƙed rokem

    my bot doesnt have cooldown for the command even tho i did it right pls help

  • @mael.916
    @mael.916 Pƙed rokem

    hey! at 4:59 I have this error :
    TypeError: (intermediate value) is not a function
    at Object. (C:\Users\auiop\OneDrive\Bureau\Document\BOT JS\bot economie\main.js:15:1)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47
    Node.js v18.16.0
    can you explain me why ?

    • @mael.916
      @mael.916 Pƙed rokem

      It's okay, I found the error and I corrected it

    • @wizard01913
      @wizard01913 Pƙed 9 měsĂ­ci

      how

  • @breatheairx
    @breatheairx Pƙed rokem +1

    Hey, amazing video! but I am getting this error; "Error handling /daily: ReferenceError: Cannot access 'userProfile' before initialization", if you are able to reply and try to help me, that would be great!

    • @breatheairx
      @breatheairx Pƙed rokem

      Fixed it, but now I have an error: ValidationError: userID: Path `userID` is required.

    • @breatheairx
      @breatheairx Pƙed rokem

      Fixed

    • @frequences
      @frequences Pƙed 11 měsĂ­ci

      I'm getting the same error too how can i solve it?

    • @ede_gaming
      @ede_gaming Pƙed 11 měsĂ­ci

      make sure where capital u and where normal u in the userinfo and is will be working
      @@frequences

    • @breatheairx
      @breatheairx Pƙed 10 měsĂ­ci

      Which? the ReferenceError or ValidationError?

  • @deczin_
    @deczin_ Pƙed 10 měsĂ­ci

    i found it: ReferenceError: Cannot access 'UserProfile' before initialization

  • @_Abdi_
    @_Abdi_ Pƙed 4 měsĂ­ci

    I love this guy but i'm banned on his discord 😱

  • @AbodStatus
    @AbodStatus Pƙed rokem

    I have this error:
    node:internal/process/promises:288
    triggerUncaughtException(err, true /* fromPromise */);
    ^
    Error: certificate has expired
    at TLSSocket.onConnectSecure (node:_tls_wrap:1538:34)
    at TLSSocket.emit (node:events:513:28)
    at TLSSocket.emit (node:domain:489:12)
    at TLSSocket._finishInit (node:_tls_wrap:952:8) {
    code: 'CERT_HAS_EXPIRED'
    }
    Node.js v18.12.1