So I've been working on a discord bot I made for about a year, although I stopped for a bit a couple months ago. Anyway, I was getting back into it, and last night a made a "-say (something)" command for my bot. It was working out just fine, but today, I check up on the bot again, and I start getting an error about how I didn't state valid intents, but this is my code (for the client intents).
const Discord = require('discord.js');
const client = new Discord.Client({ partials: ["MESSAGE", "CHANNEL", "REACTION"]});
If anyone knows what I'm doing wrong, I'd be super grateful if you could let me know. Thanks!
CodePudding user response:
const { Client, GatewayIntentBits , Partials } = require('discord.js');
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
],
partials: [Partials.Message, Partials.Channel, Partials.Reaction]
)}
you need to use this if you are on v14