Home > Software design >  My Discord bot is Shown as Online, but does not Respond with Anything when Using Heroku
My Discord bot is Shown as Online, but does not Respond with Anything when Using Heroku

Time:06-08

I just setup Heroku and it was very easy, however when I tested it nothing happened. Even though the bot was online, so I looked at the log in Heroku, and everything looked fine. The mongodb was connected, and it said my bot was online. I've tried restarting dyno, using a new discord token, completely restarting my app, but nothing works. Help very much appreciated!(I'm using GitHub for deploying)

Here is my Heroku Log: https://i.stack.imgur.com/lEciI.png

And just in case my Procfile:

worker: node main.js

CodePudding user response:

Have you tried using workflows? They are very easy to use and only need 2 min of your time, as the problem may occur from heroku when it automatically deploys the branch.

Instructions

  1. Create a .github folder
  2. inside that folder create a workflows folder
  3. inside that folder create a main.yml file
  4. insert the below code:
name: Deploy
on:
  push:
    branches:
      - main # the branch to deploy to heroku

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: akhileshns/[email protected] 
        with:
          heroku_api_key: ${{secrets.HEROKU_API_KEY}} #go to settings and under  copy your token key, then go to your repository add a secret in the settings of the repository with name `HEROKU_API_KEY` and value `your API key`
          heroku_app_name: "herokuappname" #Must be exact with yours
          heroku_email: "youremail"

so your path should be .github/workflows/main.yml

if you need further help then you can comment here also make sure to see in resources if the worker is enabled

  • Related