-
I have the following very simple bot: const Discord = require('discord.js');
const { User, Message, GuildMember, ThreadMember } = Discord.Partials;
const { Guilds, GuildMessages, DirectMessages } = Discord.GatewayIntents;
const client = new Discord.Client({
intents: [Guilds, GuildMessages, DirectMessages],
partials: [User, Message, GuildMember, ThreadMember]
});
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('messageCreate', (message) => {
if (message.author.bot) return; // Ignore messages from bots
console.log(`Message received`)
message.channel.send('Hello');
});
client.login('<BOT_CODE>'); I added the bot to my server--and it successfully prints How can I do this? I thought I had the correct permissions, but the bot is not printing I have the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
add the |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
add the
Channel
partial