«Offline» in the member list means Discord is not holding a connection from your bot. That has a short list of causes, and they are worth checking in this order because each one rules out the ones after it.
What to do
- Is the process running at all?
Look at the panel, not at Discord. If the server is stopped or crash-looping, nothing else matters and the console has the reason.
- Did it log in?
A running process that never printed «Logged in» is failing at the token. Check the variable is set and spelled the same in the panel and in your code.
- Did it crash after logging in?
An unhandled error kills the process seconds after start. The bot flickers online and vanishes. Scroll up in the console — the stack trace is above the exit line.
- Is it the right bot?
If you have several applications, it is easy to run one token while looking at another bot in the member list. Check the name in the «Logged in as» line matches the one you are watching.
- Is Discord itself having problems?
Rare, but it happens. If the console shows repeated reconnect attempts with no errors of yours, check Discord's status page before changing anything.
If your bot crashes at 3 a.m., it stays down until something starts it. Set an automatic restart schedule so a single unhandled error does not cost you a night — there is an article on that in this section.
In Node, process.on("unhandledRejection", console.error) turns silent deaths into a logged reason. In Python, wrap your entry point in try/except and log the exception. Ten seconds of work that saves the next hour.
The member list shows the bot green, and it stays green through a manual restart.