Heroku Discord Bot可以构建,但是在部署时不起作用

问题描述:

我已经在heroku上部署了Discord机器人(discord.py).机器人的状态为在线".在Heroku的控制台中,该机器人在Discord中处于脱机状态.我添加了Procfile并在资源中启用了dyno.我还有什么需要做的吗?

I've deployed a Discord bot(discord.py) with heroku. The status of the bot is "online" in the Heroku's Dashboard however the bot is offline in Discord.I've added the Procfile and enabled the dyno in resources. Is there anything else i have to do??

这是我的procfile的内容-worker:python bot.pyRequirements.txt:

This is my procfile's content - worker :python bot.py Requirements.txt:

尝试将 worker:python bot.py 更改为 worker:python bot.py ,并确保您的Procfile的拼写和大写与 Procfile (大写P)

Try changing worker :python bot.py to worker: python bot.py and make sure your Procfile is spelled and capitalized exactly like Procfile (capital P)

您可以打开日志并告诉我们错误是什么吗?

Can you open your log and tell us what the error is?