How to make your Discord Bot always active

28,561

Solution 1

The bot needs a computer to keep running. When you are programming and testing your bot, it's your PC which is powering it. When you close your PC or stop the bot process in the terminal, the bot user in the Discord server will also get offline. It takes time for the bot to show it's status to offline. That is the reason why it does nothing when you send a cmd. It's not running and if you wait a little bit, it will change the status to offline.

Now how can you fix this? The solution to your problem is the Cloud. Cloud is just a remote computer which runs your bot 24/7. There are tons of services available for remote hosting. I will advise you to use heroku because it's free and when you get some experience in cloud hosting, you can buy better dedicated VPS by spending some money.

There are lots of tutorial available on YouTube, which can help you to get your bot up and running on heroku.

Solution 2

You need to host the script somewhere at all times, this is what a server is typically used for, I have bought a VPS (Virtual Private Server) for my discord bots so I can host them on there and they will always be running, these VPS's cost around 5$ a month.

Share:
28,561
AdolfJames Urian
Author by

AdolfJames Urian

I wanna learn programming :)

Updated on December 25, 2022

Comments

  • AdolfJames Urian
    AdolfJames Urian over 1 year

    How do I make my Discord Bot active? When I close my vs code and command prompt, and I do the command in discord, it's not responding anymore.

    My Discord Bot is showing online but he's just not responding when I close command prompt or vs code. Is there anyway to make your Discord Bot active?

    So that even I'm not programming my Bot, it will still work.

  • Admin
    Admin about 2 years
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
  • CrazyVideoGamer
    CrazyVideoGamer about 2 years
    You have to pay for the bot to be always on