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 editor
likeQuickEdit
andanWriter 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 theDiscordBOT
folder. - 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.js
file. - Open
Google Play
. - Search for
Termux
. - Find and install
Termux
. - Once
Termux
has been installed on your device, open it. - Enter the following command
apt upgrade
then execute it. - Enter the following command
y
then execute it. - Enter the following command
apt install coreutils
then execute it. - Enter the following command
apt install nodejs
then execute it. - Enter the following command
y
then execute it. - Enter the following command
termux-setup-storage
then execute it and allow the storage permission. - Enter the following command
npm install -g nodemon
then execute it. - Enter the following command
cd /storage/emulated/0/DiscordBOT
then execute it. - Enter the following command
node index.js
then execute it. - If you did everything correctly, message
index.js has been executed
should appear. - If you provided the correct token, message
bot has logged into the account
should 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