How do I host a bot with python?

I do not know…

Please help!

Hey @Patorro50!

This really isn’t the place to ask that question. This is more of an issue and question-answer place for Glitch, not how to create Discord bots.

I would recommend checking out this tutorial on YouTube.


(if you didn’t mean a Discord bot let me know!)

I am asking how do I host a python based code 24/7 with gltich not how to make a bot.

No need to be rude, I misunderstood. I would use an equivalent Express to create an open port and UptimeRobot to ping the bot every 5 minutes.

Glitch is a friendly community, @Patorro50 please refrain from using offensive language. If you provide brief questions with no explanation then misunderstandings are likely to occur. But what Crazy suggested is the way to go - Express is a node package, so you’ll want to use an equivalent in Python, like Flask, to create an accessible end-point. And then hit that end-point with a service like Uptime Robot to prevent your bot from sleeping.

4 Likes

@patorro50 I can help you, add me on discord. Mikhalia#5398

Any possible solutions on this question please ? Im too looking for some hosting solution related to discord bot using Glitch

Hey @itzpc I’m not sure what you’re looking for here. There are any number of tutorials on the internet for hosting discord bots on Glitch, and if you’re looking for Python specifically you might take a look at the projects found at https://glitch.com/search?q=python%20discord&activeFilter=project.

Hope this helps!

You cant. Discord.py requires python >= 3.6, when glitch only has 2.7 installed

I don’t know if Glitch had python 3.6 back on June 30 but it is possible (at least nowadays) to use python3.7

In start.sh, use python3 rather than python
and pip3 rather than pip, etc.

If you use requirements.txt it won’t work since it will use 2.7 to install. I guess you can mess around with paths and stuff to make Glitch use pip3 when following requirements.txt but I haven’t tried. I guess I’m too lazy.