const { Client, Intents } = require('discord.js');
require('dotenv').config()
const client = new Client({
intents: [
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MESSAGES
]
})
client.once('ready', () => {
console.log(`Logged in as ${client.user.tag}!`)
})
client.on('messageCreate', message => {
if (message.author.bot) return // This prevents an infinite loop
if (message.content === 'content') {
message.channel.send('content')
}
})
client.login(process.env.TOKEN)