Why Discord Bots Go Offline
Discord bots perform a lot of functions on the service. Bots can play music, send automated messages, moderate serves, and perform any range of functions that you configure it to perform as long as they don’t violate Discord’s terms of service. If you moderate any sufficiently large serve you will need a bot to automate some of the more common tasks. A bot can, for example, send welcome messages to every new person who joins your server, delete messages that contain foul language, mute, kick or even permanently ban users who repeatedly violate the rules of your server.
But Discord bots sometimes go offline. There are four major reasons:
- The code for your bot may have bugs.
- Your bot may be violating Discord’s terms of service
- The computer or server hosting your bot may be turned off.
- Your bot may not be designed to be always online.
Why is your Discord bot not working?
A major cause of most Discord bots going offline is bugs. If there are significant errors in your code, your bot may encounter a problem every time it runs and shut down. You can solve this by carefully reviewing and debugging your code before publishing your bot. Sites like Glitch and Stack Overflow may help you in pinpointing the origin of specific error messages.
- Offline host
The second reason may be hosting. Some of the more popular bots are made by developers and offered for a subscription fee or for free. These bots are usually hosted externally so you only need to invite them to your server. All the hosting and processing is done externally. If these go offline, then it’s usually because of a problem with the bot creator and you need to contact them.
But you may choose to code your own bot for any number of reasons. For such a bot, you will need to host it yourself. To stay online, such a bot will need a host that is always online. If you choose to host it on your own computer, it will always go offline whenever you switch off your computer. Your bot may also go offline if your computer lacks sufficient RAM and processing power to handle all incoming requests. And self-hosting a particularly popular bot will not do your Wi-Fi plan any favors.
You can easily solve this problem by hosting your bot on a virtual private server. Many charge a small monthly fee (around $5) and are the ones we would suggest. While free VPSs exist, they will often limit the bandwidth of your bot and its hours of operation so it may not always be online 24/7.
- Violating Discord’s ToS
The third reason is straight-up violating Discord’s terms of service. Discord, for example, does not allow self-bots. These are bots that automate your own personal account, sending messages and doing everything else a human can do under a human username. This is not allowed. Bots on Discord have their own user accounts and aren’t supposed to impersonate humans.
The other terms of service violations are pretty standard. Bots that violate copyrights, bully and harass users or facilitate illegal activities are all banned.
- Bot design
A bot that is only designed to send messages at regular intervals, for example, doesn’t need to be always online. If you check on it during an unscheduled operational time, it will appear offline.
How do you make a bot stay online in Discord?
For a bot to keep running, it needs a computer. If you’re self-hosting your bot, you need to keep your computer/server always on and maintain a stable internet connection. You also have to make sure that your hardware (processor and RAM) is powerful enough to handle the expected volume of requests.
The best way to ensure a bot is continuously active is to host it in the cloud. There are countless cloud hosting services you can use. Many charge a small fee. If your cloud-hosted bot still goes offline then it’s usually because of a problem on their side and there’s often nothing you can do. You just have to wait for them to fix it. To limit this, choose a cloud service with good customer service and a reputation for reliable server uptimes.
How do you make a bot always active on Discord?
Keeping a bot active is just a matter of maintaining a continuous connection between the bot and Discord’s gateway. For this, you need to host the bot on either a cloud server or a computer that is always on in addition to having a stable internet connection and sufficient processing power to handle incoming requests.
How do you reset a Discord bot?
You can reset a troublesome Discord bot by simply uninviting it to your channel. You can wait a couple of minutes and then invite it back. If it’s a bot you made yourself, you can terminate its operations and restart it again in addition to the uninvite-invite operation.