繁体   English   中英

如何修复Heroku Dyno不显示?

[英]How to fix Heroku Dyno not showing up?

好的,我正在尝试制作Discord.py机器人。 我做到了,但现在无法托管。 当我尝试(在Heroku上)时,测功机永远不会出现。 这是GitHub链接: https : //github.com/EchoNoahGaming/echobot/

我希望它有一个Dyno,但没有。

Procfile中仅包含“ worker:pybot.py”,并且在日志中显示

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

一些主要的机器人是

@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')))

您的Procfile定义不正确,请将其worker: pybot.py更改为--> worker: python pybot.py

同样,在您的requirements.txt它应该仅是未在Python中默认安装的模数名称,以及您将需要的模数名称。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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