最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to make your Discord Bot always active - Stack Overflow

programmeradmin2浏览0评论

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

My Discord Bot is showing online but he's just not responding when I close mand 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.

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

My Discord Bot is showing online but he's just not responding when I close mand 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.

Share Improve this question edited Oct 16, 2020 at 11:35 rioV8 28.9k4 gold badges42 silver badges61 bronze badges asked Oct 16, 2020 at 11:29 AdolfJames UrianAdolfJames Urian 951 gold badge1 silver badge10 bronze badges
Add a ment  | 

5 Answers 5

Reset to default 3

The bot needs a puter 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 puter 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.

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.

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-puter 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

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

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

发布评论

评论列表(0)

  1. 暂无评论