How to Host a Discord Bot 24/7 for FREE

preview_player
Показать описание
Hosting a Discord Bot with Python with Heroku, VPS, or self-hosting

In this tutorial, I will show you the pros and cons of VPS Hosting, Self-Hosting, and hosting on free cloud platforms.

I will also show you how to set up your bot to run 24/7 on Heroku 100% for free.

Note: If you want a website and a bot, don't put them in the same app because Heroku will make your bot sleep if it has a website. If you need dynamic file storage and using a database or web API does not work for you, you'll need to look beyond Heroku and pay for VPS hosting.

You will be able to host any kind of bot on Heroku with no limitations by following the steps in this video.

👨‍💻 Source Code

💬 Dev Pro Tips Discussion & Support Server

📜 Heroku CLI Documentation

📜 Nextcord

📓 Python Discord Bot Template

In future videos in this series, I will show you how you can:
* Build cog modules to help make your code more maintainable
* Implement a fancy Help Command
* Interact with other APIs to make useful bot features
* Much more

Make sure to subscribe so you don't miss anything!

📺 In this video:
0:00 - Introduction
0:38 - Pros and Cons
2:30 - Signing up for Heroku
3:00 - Deploying for the first time
3:55 - Adding Heroku config files
6:17 - Turning on the bot
6:43- Adding Discord token config variable
7:42 - Testing the bot
8:08 - Get more free dyno hours
9:02 - What's next

🐍 More Discord Bot Tutorials

💻 More tutorials

🙋‍♂️ Find me on other channels

💖 SPONSORS 💖
Get your username or a link to your channel here by sponsoring on GitHub

🎁 GET FREE STUFF WHILE SUPPORTING MY TUTORIALS
Рекомендации по теме
Комментарии
Автор

6:10 when i refreshed the page there is still no dyno formation show up, can someone help me?

basiclol
Автор

if you mentioned what exactly the "repo" is in THIS video instead of referring us to the last video it would be a little bit easier to follow for people who already made the bot and just want to know how to host it

PainInTheAxe
Автор

So.. it appears that Heroku is no longer free.
I just went thru this process and nearly halfway thru when I went to enable the worker it said its going to paid only starting 11/28/2022

Gitago
Автор

This was extremely helpful, thank you!

thejacksloan
Автор

when it comes to the worker part I have no clue what to put because mine isn't like yours

Liam_
Автор

It keeps saying that "Internal Server Error" In Heroku. Does anyone have any ideas to solve this issue?

Isaacytyyyc
Автор

the bot are online but commands doesn't work

modo_discord
Автор

Could Heroku run a stable diffusion discord bot or would that be too much?

lilstringcheese
Автор

thank you so much. this was very helpful

lilpar
Автор

Question, when I finish hosting the bot on Heroku, how do I make changes to the bot?

When I run my original code of the bot in VSC (after having finished hosting), the terminal would show "AttributeError: 'NoneType' object has no attribute 'strip'", but I assume that has something to do with the fact that the bot is currently running on Heroku? If I just apply changes to the bot on GitHub straightaway by editing the code file there (and if the code fortunately doesn't need debugging lol), it still works, but as you can see, that's awfully annoying. I wonder if there's a way to sync my changes to files in my computer with the GitHub repository.

satsuna_huong
Автор

Thanks for this! i used it to make my own music bot since rythm and groovy are gone

Ayinaki
Автор

What happens when heroku says build failed? What did I do wrong?

aferil
Автор

Small question tho, do your unused hours stack up when time goes on? Like will any hours I dont use this month transfer over to next month?

joeg
Автор

IT helped me alot, but i do not really recommend heroku. It is free and kinda great, but most often heroku servers are dog sh1t. and they always have problems.

prodfilth
Автор

Heroku is now shutting down their free dyno tier :(

Adhithya
Автор

What a scam.. 500 hours isn't 24/7 hosting

ElmoPlayss