Error with Flag Guilds and more.

This is my code: const { Client, Intents, MessageEmbed } = require('discord.js'); const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] }); const prefix = '!'; // ... (rest of your code) client.on('ready', () => { console.log(Logged in as ${client.user.tag}!); }); client.on('messageCreate', (message) => { if (message.author.bot || !message.content.startsWith(prefix)) { return; // Ignore messages from bots and messages without the prefix } const args = message.content.slice(prefix.length).trim().split(/ +/); const command = args.shift().toLowerCase(); if (command === 'crewid') { const embed = new MessageEmbed() .setColor('#000000') .setTitle('Eternal ID') .setDescription('The in-game crew ID for ETERNAL is 33111778.') message.channel.send({ embeds: [embed] }); } }); // Replace 'YOUR_BOT_TOKEN' with your actual bot token client.login('mytoken'); const express = require('express'); const app = express(); app.get('/', (req, res) => { res.send('Bot is online.'); }); const listener = app.listen(process.env.PORT, () => { console.log('Your app is listening on port ' + listener.address().port); }); And i get this error..
No description
17 Replies
d.js toolkit
d.js toolkit15mo 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
crimsonn
crimsonnOP15mo ago
not a flag guilds error actually thats my bad
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
crimsonn
crimsonnOP15mo ago
i have v13 installed
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
crimsonn
crimsonnOP15mo ago
No description
crimsonn
crimsonnOP15mo ago
dont midn the fact im on mobile atm
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
crimsonn
crimsonnOP15mo ago
as in these?
No description
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
crimsonn
crimsonnOP15mo ago
not too sure how to access it i dont use replit much
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
crimsonn
crimsonnOP15mo ago
No description
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
crimsonn
crimsonnOP15mo ago
No description
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
crimsonn
crimsonnOP15mo ago
appreciate it!
Want results from more Discord servers?
Add your server