title: How to run .bat file on Heroku? (trying to set up discord music bot on Heroku)
body: <p>I have been trying to host a discord bot on Heroku.
  Bot link: 
  <a href="https://github.com/Just-Some-Bots/MusicBot" rel="nofollow noreferrer">https://github.com/Just-Some-Bots/MusicBot</a></p>
  
  <p>I have set it all up and successfully host it on my own computer.
  The problem is that I want to host it on an online service like Heroku.
  Successfully deploy and it said found a python app.
  However I didn't see the bot in discord goes online...</p>
  
  <p>This is what I think the problem is, 
  when I host it on my computer I have to run "runbot.bat" file
  which looks like this:</p>
  
  <pre><code>@ECHO off
  
  CHCP 65001 &gt; NUL
  CD /d "%~dp0"
  
  SETLOCAL ENABLEEXTENSIONS
  SET KEY_NAME="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
  SET VALUE_NAME=HideFileExt
  
  FOR /F "usebackq tokens=1-3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^&gt;nul`) DO (
      SET ValueName=%%A
      SET ValueType=%%B
      SET ValueValue=%%C
  )
  
  IF x%ValueValue:0x0=%==x%ValueValue% (
      ECHO Unhiding file extensions...
      START CMD /c REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v HideFileExt /t REG_DWORD /d 0 /f
  )
  ENDLOCAL
  
  
  IF EXIST %SYSTEMROOT%\py.exe (
      CMD /k py.exe -3.5 run.py
      EXIT
  )
  
  python --version &gt; NUL 2&gt;&amp;1
  IF %ERRORLEVEL% NEQ 0 GOTO nopython
  
  CMD /k python run.py
  GOTO end
  
  :nopython
  ECHO ERROR: Python has either not been installed or not added to your PATH.
  
  :end
  PAUSE
  </code></pre>
  
  <p>And there's a file called "procfile" which I learned from here: 
  <a href="https://www.reddit.com/r/discordapp/comments/5dkqpd/help_how_do_you_host_a_discord_bot_from_heroku/" rel="nofollow noreferrer">https://www.reddit.com/r/discordapp/comments/5dkqpd/help_how_do_you_host_a_discord_bot_from_heroku/</a></p>
  
  <p>I have tried </p>
  
  <pre><code>worker: runboot.bat
  </code></pre>
  
  <p>,</p>
  
  <pre><code>worker: python run.py
  </code></pre>
  
  <p>and </p>
  
  <pre><code>worker: python bot.py
  </code></pre>
  
  <p>but no luck. I think the process type is missing or wrong for the .bat file.
  How do I run .bat file on Heroku? 
  Or if anyone has some experience of hosting this bot, any help would be really appreciated. thanks!</p>