discord.js npm
npm i discord.js
3.67
9
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')
Thank you!
9
0
Are there any code examples left?
New code examples in category Javascript