LogoLogo
πŸ‡ΊπŸ‡Έ EN
πŸ‡ΊπŸ‡Έ EN
  • πŸ‘‹Welcome
  • Suport
    • ☁️How to Host
      • πŸ€–Bots
        • πŸ”ŒBot
        • 🧩VSCode Extension
        • ⌨️CLI
      • 🌎Website and APIs
        • πŸ”ŒBot
        • 🧩VSCode Extension
        • ⌨️CLI
    • ⌨️Languages
      • 🟨JavaScript
        • πŸ“„Create the package.json
      • 🐍Python
        • πŸ“„Create the requirements.txt
      • β˜•Java
      • πŸ’ŽRuby
        • πŸ“„Create the Gemfile
      • 🐿️Go
      • 🐘Php
      • πŸ¦€Rust
        • πŸ“„Create the Cargo.toml
    • ⛓️Integrations
      • 🌐Your Own Domain
      • πŸ™GitHub and GitLab
      • 🎧Lavalink
      • πŸ’ΎDatabase
        • MongoDB Atlas (mLab)
    • ❓Frequently Asked Questions (FAQ)
      • How to compress my files?
      • Discloud ModMail (Ticket)
      • How do I get my bot's ID?
      • What is the main file?
      • Configuring Puppeteer
      • How to report an offender?
      • Why can't I access my website?
      • Very Heavy BOT
    • βš’οΈCommands
      • How to get API token
      • How to integrate Github
    • 🀲Donations
  • configuration
    • βš™οΈdiscloud.config
      • πŸ“¦APT (Install Packages)
      • πŸ—οΈVERSION (Switch between Versions)
  • πŸ–₯️local environment
    • βš™οΈInstall
      • 🟨JavaScript (NodeJS)
      • 🐍Python
      • πŸ’ŽRuby
      • πŸ¦€Rust
  • API
    • πŸ“‘Using the API
    • πŸ”—Routes
  • About
    • 🎨Discloud Brand
      • Name origin
      • Visual Identity
  • πŸ”—Links
    • 🌎Website
    • πŸ“ŠDisCloud Status
  • πŸ“œLegal
    • πŸ“„Terms of Service (TOS)
Powered by GitBook
On this page
  • General main files
  • Exceptions (defaults)
  • How do I know my main file?

Was this helpful?

Edit on GitHub
  1. Suport
  2. Frequently Asked Questions (FAQ)

What is the main file?

PreviousHow do I get my bot's ID?NextConfiguring Puppeteer

Last updated 2 years ago

Was this helpful?

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

Python

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

    • when running python MainFile.py command

    • by right clicking and then RUN in PyCharm.

Java

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

    • when running java -jar MainFile.java command

    • by double-clicking the file MainFile.jar

Ruby

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

    • when running ruby MainFile.rb command

Go

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

    • when running go run MainFile.go command

Php

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

    • when running php MainFile.php comma

Rust

Usually the main file is src/main.rs

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.

❓
πŸ“
πŸ“
πŸ€”