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

Discord bots are mostly idle and spend much time waiting for events(which you can also ask discord to filter out), it’s mostly just leaving a websocket gateway connection open

Keeping it open in a browser is just additional workload. The more resources you add, you use up more ram or cpu power.

1 Like

if yall don’t care about sharding and music bots, you could try discord.js in the browser :smiley: https://github.com/discordjs/discord.js/blob/master/docs/topics/web.md

4 Likes

Idea💡comes to my life…

1 Like

ok so it keeps saying “module discord.js not found”

Edit: I fixed it

2 Likes

Umm how do I create a command!

You should probably learn discordjs.

1 Like

@ApartSquare3916 You just leaked your bots token, it can be used maliciously by people. Please re-generate your bots token at: https://discord.com/developers/applications

Hey @ApartSquare3916, you leaked your Discord bot token, I’ve flagged it for moderation, would be nice if you removed those images and regenerated your bot token as quickly as possible.

I have regenerated my token can someone Atlest please help me with those errors?

Could you share your code without the token or with a fake token?

Help me how do I make a command it sends errors!!! :frowning:

Maybe tell us the errors

help…

message is not defined

Define it

4 Likes

How to define that huh?

Hey there it seems like you are fairly new to discordjs and javascript, below i have provided some resources that can help solve your question

https://www.w3schools.com/js/js_variables.asp
https://discordjs.guide/creating-your-bot/#listening-for-messages

If you have any more questions after reading these, make sure to ask!

4 Likes

Can I see your code that uses the variable message?

I am dumb I needed to use msg lamo

You can use Bluestacks.