How to make discord.js work with glitch
First make a project
Then go to packages.bat and click on add packages and search up for discord.js
Once you have done that go onto discord and make the applaction
Now you will need to make it a bot username by clicking a button
Once your done you can go and click reveal token then copy the token you got
Then put this code in server.js
const Discord = require("discord.js");
const client = new Discord.Client();
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('message', msg => {
if (msg.content === 'ping') {
msg.reply('Pong!');
}
});
client.login('token');
Replace Token to the token you copyed
And your done you made a discord bot with glitch!