<bdo id='shfdb'></bdo><ul id='shfdb'></ul>

<legend id='shfdb'><style id='shfdb'><dir id='shfdb'><q id='shfdb'></q></dir></style></legend>

    <small id='shfdb'></small><noframes id='shfdb'>

    <tfoot id='shfdb'></tfoot>
  1. <i id='shfdb'><tr id='shfdb'><dt id='shfdb'><q id='shfdb'><span id='shfdb'><b id='shfdb'><form id='shfdb'><ins id='shfdb'></ins><ul id='shfdb'></ul><sub id='shfdb'></sub></form><legend id='shfdb'></legend><bdo id='shfdb'><pre id='shfdb'><center id='shfdb'></center></pre></bdo></b><th id='shfdb'></th></span></q></dt></tr></i><div id='shfdb'><tfoot id='shfdb'></tfoot><dl id='shfdb'><fieldset id='shfdb'></fieldset></dl></div>

      如何在 heroku 上托管我的 discord.py 机器人?

      时间:2023-10-11

        <legend id='YolsG'><style id='YolsG'><dir id='YolsG'><q id='YolsG'></q></dir></style></legend>

      1. <small id='YolsG'></small><noframes id='YolsG'>

        • <i id='YolsG'><tr id='YolsG'><dt id='YolsG'><q id='YolsG'><span id='YolsG'><b id='YolsG'><form id='YolsG'><ins id='YolsG'></ins><ul id='YolsG'></ul><sub id='YolsG'></sub></form><legend id='YolsG'></legend><bdo id='YolsG'><pre id='YolsG'><center id='YolsG'></center></pre></bdo></b><th id='YolsG'></th></span></q></dt></tr></i><div id='YolsG'><tfoot id='YolsG'></tfoot><dl id='YolsG'><fieldset id='YolsG'></fieldset></dl></div>

            <tfoot id='YolsG'></tfoot>
                <bdo id='YolsG'></bdo><ul id='YolsG'></ul>
                  <tbody id='YolsG'></tbody>
                本文介绍了如何在 heroku 上托管我的 discord.py 机器人?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我目前正在尝试将我的 discord 机器人安装到 Heroku 并 24/7 全天候托管它,但我遇到了问题.

                1. 我将我的机器人上传到了 github ,用记事本打开它并写入 worker: python name_of_bot_file.py 并保存在同一个存储库中

                1. 创建一个名为 runtime.txt 的文本文件并粘贴 python-3.6.5 或您用于编写机器人的任何 python 版本并将其保存在相同的存储库.

                2. (如果您在 virtualenv 中,请退出)打开控制台并编写 heroku login 并输入您的 heroku 登录详细信息

                3. 然后执行 heroku apps:create name_of_appheroku buildpacks:set heroku/python

                4. 最后,如果你只想推送一个分支,请执行 git push heroku maingit push heroku branch_name:main

                I am currently trying to get my discord bot on to Heroku and host it 24/7 but I am having problems.

                1. I uploaded my bot to github https://github.com/zemocode/flankebot/tree/master

                2. I have created the two main files I needed

                3. I clicked deploy branch on Heroku and I'm getting this error.

                 !     No default language could be detected for this app.
                            HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
                            See https://devcenter.heroku.com/articles/buildpacks
                 !     Push failed
                

                I have followed tutorials but everyone else has node.js and I so mine doesn't work.

                解决方案

                You're missing a couple of things to make this work, for the sake of everyone Googling how to host discord.py on Heroku and getting this as the top result here's a step-by-step

                1. Install Git and do git init when inside your directory
                2. (If you're using virtualenv or similar go into it and) do pip freeze then copy the contents you get to a file called requirements.txt and save it in the same repository as the bot
                3. Make a file (a file of type file) , open it with notepad and write worker: python name_of_bot_file.py and save within the same repository

                1. Make a text file called runtime.txt and paste python-3.6.5 or whichever python version you were using to write the bot and save it in the same repository.

                2. (If you're inside virtualenv get out and) open your console and write heroku login and input your heroku login details

                3. Then do heroku apps:create name_of_app and heroku buildpacks:set heroku/python

                4. Finally, do git push heroku main or git push heroku branch_name:main if you want to only push one branch

                这篇关于如何在 heroku 上托管我的 discord.py 机器人?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:discord.py - 自动更改角色颜色 下一篇:message.channel.id Discord PY

                相关文章

                最新文章

                <tfoot id='GFult'></tfoot>

                    <bdo id='GFult'></bdo><ul id='GFult'></ul>

                1. <i id='GFult'><tr id='GFult'><dt id='GFult'><q id='GFult'><span id='GFult'><b id='GFult'><form id='GFult'><ins id='GFult'></ins><ul id='GFult'></ul><sub id='GFult'></sub></form><legend id='GFult'></legend><bdo id='GFult'><pre id='GFult'><center id='GFult'></center></pre></bdo></b><th id='GFult'></th></span></q></dt></tr></i><div id='GFult'><tfoot id='GFult'></tfoot><dl id='GFult'><fieldset id='GFult'></fieldset></dl></div>

                  <small id='GFult'></small><noframes id='GFult'>

                  <legend id='GFult'><style id='GFult'><dir id='GFult'><q id='GFult'></q></dir></style></legend>