What is the main file?

πŸ“ General main files

The main file is the fundamental code of your bot, making your bot go online and perform other actions automatically. Such as: index.js, bot.js and index.py, depending on what name you put in.

πŸ“ Exceptions (defaults)

Some bot making software, such as Discord Bot Maker and Discord Bot Controls, have a default main file already set up, which is: bot.js.

πŸ€” How do I know my main file?

JavaScript

  • The main file is the one you use to start your bot:

    • when running node MainFile.js command

    • which is usually in package.json in main

The name MainFile.* is the file in the situation described, which varies from person to person since they can put whatever name they want, so analyze your method of turning the bot on by comparing it to the situations shown to know which is the main file.

Last updated