Discord bot node.js currency system guide bot error [closed]

Discord bot node.js currency system guide bot error [closed] - Close Up Photo of Toy Bot

So I was making a discord bot and put in all the code for the discord currency system, when it failed to start I even copied and pasted the resulting code and it still failed, I put in everything so what is going wrong? The error is:

 Error: Cannot find module
←[90m    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)←[39m
←[90m    at Function.Module._load (node:internal/modules/cjs/loader:778:27)←[39m
←[90m    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)←[39m
←[90m    at node:internal/main/run_main_module:17:47←[39m {
  code: ←[32m'MODULE_NOT_FOUND'←[39m,
  requireStack: []
}

I don't know what to do at this point, google has been no help and I dont know what its even referring to.



Best Answer

You are missing a require() statement to import a dependency, or have forgotten to run npm install to install a dependency.

When you post this on StackOverflow, please include the snippet of code that is causing this error.


Update: Don't post it to StackOverflow. You'll likely be marked as a duplicate of this question.

A quick Google search for at node:internal/main/run_main_module MODULE_NOT_FOUND found that.




Pictures about "Discord bot node.js currency system guide bot error [closed]"

Discord bot node.js currency system guide bot error [closed] - Low Angle Shot of Robot
Discord bot node.js currency system guide bot error [closed] - MIniature Toy Robot on Top of Laptop's Keyboard
Discord bot node.js currency system guide bot error [closed] - HIgh Angle Shot of Toy Robot



How do I enable Discord bot in node JS?

Once you're logged in, click on 'New Application' at the top right of the window. Then fill in the details of your app (i.e. name) and you will be taken to your app's dashboard. Navigate to 'Bot' and click 'Add Bot' to enable your app as a bot. Now, you'll have your bot and see this section appear.

How do you make a currency Discord bot?

The An invalid token was provided error is given because the token you have set in . login() is not valid or revoked by Discord for several reasons like spam, malicious behaviour or inactivity. Also make sure you have your own bot application created in the Discord Developer Portal.

Why is my bot token invalid?

Take the following actions to complete this:
  • Log back into the Discord Developers Portal.
  • Select Your Application.
  • Go to the OAuth2 Panel.
  • Select \u201cBot\u201d and Desired Permissions.
  • Copy/Paste the OAuth2 URL into your browser.
  • Select which server to add the bot to.
  • Click all the right buttons to confirm.




  • Code A Discord Bot - Economy System | Balance \u0026 Beg | (2021)




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Kindel Media, Kindel Media, Kindel Media, Kindel Media