Question

Using the App platform to host a Discord Bot

I’ve set up a basic Discord PyCord bot using a github repo that contains a requirements.txt, my bot.py, and one single cog called admin.py which is loaded when the bot starts.

Using the App platform, this code is deployed with the Run Command “python3 bot.py”. When the platform attempts to actually run this code the logs show that the bot successfully connects and all seems well, but then I am informed the Deployment Failed and am left without an error message or any idea of what went wrong.

Anyone have any clue how to get this to work? I assume this has something to do with health checks but have no leads.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
February 15, 2023

Hi there,

It sounds like that the App Platform Health check is failing. What you could do is to use a worker component rather than a web component so that the App Platform would not look for a HTTP health check endpoint.

https://docs.digitalocean.com/products/app-platform/how-to/manage-workers/

Let me know how it goes!

Best,

Bobby

It turns out you have to select a service instance of type “Worker” and not “Web”, then it will work as you expect.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel