const Discord = require('discord.js');
const DISCORD_SECRET = "put bot token here";
const client = new Discord.Client();
client.on('message', msg => {
if (msg.content === 'ping') {
msg.reply('pong');
}
});
client.login(DISCORD_SECRET);
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(process.env.TOKEN)
/* Okay So
1. You need to know the basics of Discord.js (learn on yt)
2. Go to dev portal (https://discord.com/developers/applications) Make a bot
Invite to your server
3. Start coding the bot in Discord.js
4. Host the bot somewhere like repl.it
5. You're done / Implement the bot
*/