Search code examples
discorddiscord.jscommand-promptstartup

how to make command prompt run discord bot on startup


I have made my own discrd bot using discord,js and want it to run whenever my computer starts. i want it to open and perform the following- cd C:\Users\manan\OneDrive\Desktop\project\

node .


Solution

  • Hello you can use the windows startup folder.

    1. Click windows key + R.
    2. Type shell:startup and click enter.
    3. Create a new bat file in this folder.
    4. Add your commands:
    cd C:\Users\manan\OneDrive\Desktop\project\
    node .
    
    

    Or the scheduled tasks.

    1. Click windows key + R.
    2. Type taskschd.msc and click enter.
    3. Go to Actions Panel -> create a basic task.
    4. Set a name and click next.
    5. Select at startup and click next again.
    6. Select the bat file you want to run.
    7. You’re done !