Learn to Code via Tutorials on Repl.it!

← Back to all posts
Hosting discord bots WITHOUT 3rd party pinging services!!!

Hey there guys, many of us have made discord bot's BUT always have faced the problem that they didn't stay online...

So we had to get a million pinging services on them to keep them online... Not anymore!

We all probably already are in the habit of starting the webservers, and we need that, but no more pinging services!!!

If you don't know how to start a web server, see code below

So when you run your bot the first time with only this, the web server will open.

Now, if you don't have a on_ready function already in your bot, you can make it simply by just pasting this line.

We now have our web server and our function, so what we do is add the following code to the imports and the on_ready function and we are good to go!

I'm hoping no issues arise with this, if they do, feel free to comment or DM me on discord, Sadashi#5058


There is nothing wrong with pinging a bot, it takes 1 second to set up and just leave it. This won't work if the bot goes down. Pingers normally will restart the bot but this won't


anyway you can do this for discord.js bots?