How to boot off a discord bot with command

how do you boot off the bot?
like turn it off
like boot off all the code, is that possible?

if so, how do you turn it back on?

Please and thank you!

You want the bot to reboot?

You let the client disconnect and after a while, you let it connect again.

Easy!

I found this about restarting a bot…
Maybe you could modify this code?

2 Likes

When I do !restart to my bot I run this command

// Do nothing if user who triggered the command is not the owner with OWNERID in your .env file
if (message.author.id != process.env.OWNERID) return;
// Send message in the channel indicating it is working
message.channel.send('⚠️ Restarting...').then(() => {
  // Restart all the glitch code with this line
  return process.exit(1);
});

In simple words the line that makes all the glitch project boot again is:
process.exit(1);

then how do you start it back up

@ElBort @TH3_UNKNOWN Look at this reply from @RiversideRocks

alright, ty so muchh

if you run process.exit(1) will restart all the code, it is automatic

@anon7375287 I saw the reply of @RiversideRocks but that is only to log off and on the bot

Reading the first question that @TH3_UNKNOWN ask he needs something to boot all the code I think the process.exit(1) line is the best for this goal

Anyway is good to know the method of RiversideRocks, thanks :slight_smile:

like a reboot command, thats what I whant

and i whant it to reboot all the code

So use the code I sent you. Change the word for restart for reboot

For me is the same, but is what you are looking for

alright! is there any way to quickly convert v11 to v12 code? im too lazy to do so, and i got so much code…

Uhm, there is… I recently told a guy the same. There is on Glitch a find and replace option.

Crlt + Alt + F = Find and Replace
Crlt + F = Find

That should work.

it won’t do anything, its just like
crlt + g

There is not a quick way.

You can start working a new project, going step by step of your code converting everything from v11 to v12

I recommend you to do this with a new test bot, and token in a new project.

So you do not have to turn off your main bot and just update when your v12 is done

1 Like

ugh that wold take some time…

Yes, it will take time. You can stay in v11 anyways, at least until the bot gets broken itself.

Do not worry about time, you can make your own schedule. You do not need to do it all in a day. Go with little steps.

Or take a big coffee cup and do it all in a day. If you are in self isolation (quarantine) you can take advantage of this haha

That is developer’s life to do not burn out or to burn out all

yeah! thanks though!, if you whant to contact me, just dm me on discord, TH3 UNKN0WN?#4221