AdolfJames Urian
AdolfJames Urian

Reputation: 95

How to make your Discord Bot always active

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.

Upvotes: 0

Views: 59563

Answers (5)

thomas
thomas

Reputation: 1

helo you can try autocode but its status is playing autocode.com so you want put a snuppet called status and change your staus

Upvotes: -3

SpaceTurtle0
SpaceTurtle0

Reputation: 161

I may be late but there is a pretty viable solution to keep your bot online 24/7. You can use a tool called repl.it which serves as an IDE and a good enough solution for hosting.

Discord.js Guide: https://repl.it/talk/learn/Hosting-discordjs-bots-on-replit-Works-for-both-discordjs-and-Eris/11027

Upvotes: 0

Aci
Aci

Reputation: 566

You can always get a raspberry pi to host you bot, you just need to make sure that it stays on. It's essentially a mini-computer but requires alot less power. It also has less advanced hardware, but it should be more than enough for a Discord bot ^^ Here's a tutorial teaching you how to set up a Discord bot on a raspberry pi: https://anidiots.guide/hosting/hosting-on-a-raspberry-pi

Upvotes: 0

Shubham Parihar
Shubham Parihar

Reputation: 673

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.

Upvotes: 3

Ollie Pugh
Ollie Pugh

Reputation: 446

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.

Upvotes: 1

Related Questions