bitfield whateva

const { Client, Intents } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.MESSAGE_CREATE] });

client.once('ready', () => {
console.log('Ready!');
});

client.on('messageCreate', message => {
if (message.content.startsWith('!c')) {
// Extract level ID from message content
const args = message.content.slice('!c'.length).trim().split(/ +/);
const levelId = args.shift();

// Place your bot logic here, e.g., spam comments on the specified level ID
message.channel.send(`ok ${levelId}...`);
// Add your bot logic here
}
});

client.login('YOUR_BOT_TOKEN');
const { Client, Intents } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.MESSAGE_CREATE] });

client.once('ready', () => {
console.log('Ready!');
});

client.on('messageCreate', message => {
if (message.content.startsWith('!c')) {
// Extract level ID from message content
const args = message.content.slice('!c'.length).trim().split(/ +/);
const levelId = args.shift();

// Place your bot logic here, e.g., spam comments on the specified level ID
message.channel.send(`ok ${levelId}...`);
// Add your bot logic here
}
});

client.login('YOUR_BOT_TOKEN');
i know its to do with converting the screaming snake to the new one, but i dont know the name of the new intents, if someone could give me the names id appreciate it
9 Replies
d.js toolkit
d.js toolkit10mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
rec
recOP10mo ago
13.17.1, 21.7.1
monbrey
monbrey10mo ago
The names didnt change, and if you're on v13 you dont need to convert them So... I'm not sure what problem you're having
rec
recOP10mo ago
its giving me an error, ive looked through the wiki and its saying stuff about changing them let me take a sc of console 1 sec
monbrey
monbrey10mo ago
For v14, yes
rec
recOP10mo ago
No description
rec
recOP10mo ago
it could be that ive messed up something else but im so confused lmfao i apologize
monbrey
monbrey10mo ago
MESSAGE_CREATE is an event name, not an intent The intent that controls that event is GUILD_MESSAGES
rec
recOP10mo ago
FLAGS.GUILD_MESSAGES? omg thank u so much
Want results from more Discord servers?
Add your server