Why NOT to use Replit as a hosting platform
You should not use Replit to host your bot. It may be a nice option as its free but you should use something else considering the major flaws.
- The machines are super underpowered.
- This means your bot will lag a lot as it gets bigger.
- You'll need a web server alongside your bot to prevent it from being shut off.
- This isn't a trivial task, and eats more of the machines power.
- Replit uses an ephemeral file system.
- This means any file you saved via your bot will be overwritten when you next launch.
- They use a shared IP for everything running on the service. This one is important - if someone is running a user bot on their service and gets banned, everyone on that IP will be banned. Including you.
Please avoid using Replit to host your bot. It's not worth the trouble.
If you're looking for free options, consider using
- Amazon Web Services
- Google Cloud Platform
- Azure
- railway.app
- Oracle Cloud Infrastructure and its respective free tiers or just pay for an actual VPS.
Replit has its own way of installing packages.
To install Pycord, first, you should first go to the package manager and uninstall the replit
package:
Similarly, remove any other packages that share the discord
namespace in a similar way.
Next, click Show Hidden Files
under the dropdown:
You should now see a file named .replit
. Open it and find guessImports
and set it to false
:
Then, click shell
and type
pip install requests
and press enter. This will install the requests
package,
which is required for the replit package manager to work.
Finally, navigate back to the package manager, search for py-cord
and install it:
And you are done! You can now start using Pycord in your Replit project.
If you don't have a .replit
file, you are using an old version of Replit. You should create a new
project and copy your code over.
If you have a .replit
file, but it doesn't have guessImports
, you are using an old version of Replit.
You should create a new project and copy your code over.