Introduction
As most of us know that Glitch permanently banned all pinging services and everything related to them. Most of us also can’t afford buying Glitch subscription or using other services. However there is an great solution for that. So let’s get started.
What You Will Need
Android device(Needed to handleTermux).Internet access(Needed to host our bot).Termux(Needed to enable us to host our bot).Code editorlikeQuickEditandanWriter free. (Optional, but very useful for coding your bot).
Step By Step Instructions
- Open your
File Manager. - Create a folder named
DiscordBOT. - Create a file named
index.js, and place it in theDiscordBOTfolder. - Write the following code to the
index.js.
console.log("index.js has been executed");
const Discord = require("discord.js");
const client = new Discord.Client();
client.on("ready", () => {
console.log("bot has logged into the account");
});
client.on("message", (message) => {
if (message.author.bot) return;
});
client.login("YOUR-DISCORD-TOKEN");
- Save and close the
index.jsfile. - Open
Google Play. - Search for
Termux. - Find and install
Termux. - Once
Termuxhas been installed on your device, open it. - Enter the following command
apt upgradethen execute it. - Enter the following command
ythen execute it. - Enter the following command
apt install coreutilsthen execute it. - Enter the following command
apt install nodejsthen execute it. - Enter the following command
ythen execute it. - Enter the following command
termux-setup-storagethen execute it and allow the storage permission. - Enter the following command
npm install -g nodemonthen execute it. - Enter the following command
cd /storage/emulated/0/DiscordBOTthen execute it. - Enter the following command
node index.jsthen execute it. - If you did everything correctly, message
index.js has been executedshould appear. - If you provided the correct token, message
bot has logged into the accountshould appear.
FAQ
How do I start the bot?
You can start the bot by doing the two commands, first command will be cd /storage/emulated/0/DiscordBOT, then second command will be node index.js, that’s it.
How do I stop the bot?
You can stop the bot, by tapping and holding your finger on the screen to get the more popup, which then you will click it and then press kill process, or you can just press ctrl-c shortcut to stop it.
How do I update the bot?
You can update your bot, by creating a shutdown command for your bot, once you will have it, run the bot command and go to Termux and then enter the following command node index.js.
How long my bot will run for?
The bot will run 24/7 unless your device runs out of the battery or once you lose the internet connection.
How much RAM, MEMORY, and CPU my bot will have?
This all depends on your device and internet. The better device is, the better your bot hosting is.
WARNING
Do NOT share your bot token, as it will allow anyone to access your bot.
If you have any questions, feel free to ask one