How to host your Discord bot 24/7 on an Android Device

It says Cannot find module ‘discord.js’

Open your terminal and run npm i discord.js

I am not exactly what plan I have cause I am not the one who buys internet lol. But around WiFi 75MB/s unlimited (no limit). He won’t get banned unless your making some sort of massive attack lol not just a simple discord bot.

1 Like

Open your Termux and Execute npm i discord.js.

Make sure you have package.json file. If you have no one, Create it by executing npm init -y

Or you can take off the y switch and have more options.

2 Likes

Let me be honest with you. You shouldn’t use your device’s data plan. Use WiFi. Your device may frequently connect and disconnect if you are moving

3 Likes

I think on Glitch, there should be a template (like posting to #the-gallery) that says "If your package is not found, try npm i YOUR_PACKAGE_NAME

2 Likes

I would recommend adding the --save flag at the end to save it to your package.json

2 Likes

How I change my bot’s Status?

Doesn’t Work…

Maybe ask this in a separate topic or read the documentation because this is a little off topic.

1 Like

It’s not off-topic, it relates the words “hosting, discord, bot, 24/7, android, nodejs, javascript”

Yes, it is off-topic, as the tutorial is how to host your discord bot on a phone, not how to fix this, or how to fix that. The latter would go in a separate topic in #discord-help.

3 Likes

Also some notice,

If you want make your Termux Run at Background, execute termux-wake-lock.

1 Like

I am using WiFi, I even mentioned it