Hosting Red Discord bot on repl.it!
Hosting Red discord bot on repl.it!
Some of you might be having a discord community! And when it comes to communities, it comes to discord bots, now a days many people want their own modmail or automod bot for discord!
Well there is a really great bot out there but hosting it is a headache. I always tried to host that bot for free in an easy way but at last, you will just give up.
Well, I have a way for you from which you can host red discord bot on repl.it for free!
In order to do this, simply head over to the home page and make a new Python REPL.
After you are done making the python repl, just make a new file called
bot.sh and then put these values there:
After you are done writing this, make another file called
.replit and fill these values there:
Done with this, now smash the run button on top! Now go through the Initial setup process:
- It will ask you for the instance name: Put any name for your bot.
- Then it will ask for the data path, just say Yes.
- After that It will ask you two options, one is JSON and another one is PostgreSQL, select JSON by typing 1.
Please note that the order of filling these values can change anytime, so please consider reading what's written and match it will the step provided above
Now when you are done with this simply again open your
bot.sh file and remove everything and replace with this:
<your instance name> to the name you entered for the bot in Step 1.
Now smash the run button again, now the bot will ask you about the bot's token. To make this guide shorter and readable, please CLICK HERE for the instructions on how to obtain a discord bot token.
When you are done with the token, paste the token in the repl console, and then it will ask you for the prefix of the bot. Enter the desired prefix you want. Don't worry, we can change this later on!
Now you will see that your bot is starting. IF you haven't invited the bot yet, simply click on the link the console gives you for the bot to invite the bot to your server.
Now we are done with the discord bot, now we only need to work on the bot to make it 24/7. As redbot doesn't store any data in the repl, unfortunately, you can't make the keep-alive server! But hey wait! I am here for you.
Simply type this command to load the bot's modules.
[p]load admin alias audio bank cleanup customcom downloader economy filter general image mod modlog mutes permissions reports streams trivia warnings
This will load all the cogs for the bot. Replace
[p] with the prefix you entered for the bot when running it.
After that type this command in the server or dms of the bot:
After that, it will ask to agree that you are installing a third-party repo. Simply type I agree.
Then type the following commands:
Now when you will come to your repl you will see that the bot established a webserver in your repl.
Now it's time to do the uptime robot thing! This is very easy!
Again to make this tutorial short, please CLICK HERE for a detailed guide on how to setup uptimerobot. Thank you for investing your time reading this tutorial, if you need any help, please Join this Server and contact YellowBanana to get the help! Peace Out :)
I get this error
´Repl.it: Updating package configuration
--> python3 -m poetry add tqdm pymongo apsw babel yarl aiohttp appdirs distro aiohttp-json-rpc colorama asyncpg motor fuzzywuzzy uvloop markdown click packaging
[RuntimeError] section not found in pyproject.toml
exit status 1
Repl.it: Package operation failed.´