python - 我的 herkou discord.py 机器人没有启动,也没有出现任何错误
问题描述
嗨,我在 heroku 上托管我的机器人。我的第一个机器人在线但是当我更改代码时它停止在线并且我在日志中没有收到任何错误。
您可以在https://github.com/reyyan987/organic查看我的代码
日志:
2021-02-27T13:29:06.299355+00:00 heroku[worker.1]: Starting process with command `python filename.py`
2021-02-27T13:29:07.003029+00:00 heroku[worker.1]: State changed from starting to up
2021-02-27T13:29:10.755961+00:00 heroku[worker.1]: Process exited with status 0
2021-02-27T13:29:10.819759+00:00 heroku[worker.1]: State changed from up to crashed
解决方案
你忘了运行你的机器人client.run
。我查看了您的电话,procfile
而您正在拨打的电话filename.py
没有运行机器人。要解决您的问题,只需setup
在filename.py
. 您还需要更改bot.run
为,client.run
因为这就是您正在使用的。
推荐阅读
- c++ - 在轮盘游戏c ++中的do / while循环中预期
- python - 在python中进行归一化的多等高线图
- react-admin - React-admin dataProvider 不会触发 authProvider 的 AUTH_ERROR
- wordpress - 使用 wp_delete_post 删除帖子时,其返回意外
- angular - 我想找出在 Ag-Grid 中编辑了哪一行?
- jquery - 如何将显示位置设置为 bootstrap-timepicker 小部件?
- c - 如何使矮小的部分在 elf 文件中加载到内存中?
- javascript - 如何使用原生 JavaScript 实现无限滚动?
- ios - 单击ios中的按钮时如何打开自定义弹出窗口
- jquery - 灯箱关闭后Jquery单击按钮