discord.js npm code example
Example 1: discord.js npm
npm i discord.js
Example 2: discord.js package
const Discord = require ('discord.js')
const bot = new Discord.Client()
bot.on("ready", async () => {
console.log("the bot is ready")
})
client.on('message', msg => {
if (msg.content === '!ping')
msg.reply(
"pong!"
)
});
//put here the token
bot.login('TOKEN')