const Discord = require("discord.js")
const client = new Discord.Client({
intents: [
Discord.GatewayIntentBits.Guilds,
Discord.GatewayIntentBits.GuildMessages
]
});
client.on("ready", () => {
console.log(`Logged in as ${client.user.tag}!`)
})
client.on("messageCreator", (msg) => {
if (msg.content === "ping") {
msg.reply("pong");
}
})
client.on("message", Message => {
if (msg.content === "hi") {
msg.reply("hello");
}
})
client.login(process.env.TOKEN)
Hi, im tryng learn how to make a discord bot for my server and i dont know much of js. I've been reading some tutorials but isnt working.