简体   繁体   中英

How to fix Heroku Dyno not showing up?

Ok so, I am trying to make a Discord.py bot. I did, but now I can't host it. When I try (on Heroku) the dyno never shows up. This is the GitHub Link: https://github.com/EchoNoahGaming/echobot/

I expected it to have a Dyno, but it didn't.

The Procfile only has "worker: pybot.py" in it, and inside of the logs it says

2019-04-07T17:07:09.025914+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=echobotyeet.herokuapp.com request_id=1330f84d-51a4-4462-9de1-cbea09bc621b fwd="172.6.17.203" dyno= connect= service= status=502 bytes= protocol=https
2019-04-07T17:07:11.185818+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/favicon.ico" host=echobotyeet.herokuapp.com request_id=93b077ec-61de-4e5f-b7e3-e9e2a0674546 fwd="172.6.17.203" dyno= connect= service= status=502 bytes= protocol=https

some of the main bot is

@bot.event
async def on_ready():
    print('Logged in as')
    print(bot.user.name)
    print(bot.user.id)
    print('------')

@bot.command()
async def announcement(ctx, *, args):
    """Announcement command!"""
    embed=discord.Embed(title="Announcement", description=args, color=0x7700aa)
    embed.set_footer(text="By EchoNoahGaming")
    await ctx.send("@everyone", embed=embed)

client.run(str(os.environ.get('BOT_TOKEN')))

Your Procfile is not defined correctly, change it worker: pybot.py to --> worker: python pybot.py

Also in your requirements.txt it should only be names of modulo that are not installed as a default with Python and ones that you'll be needing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM