𖥂 PixelFire 𖥂
𖥂 PixelFire 𖥂
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by 𖥂 PixelFire 𖥂 on 5/29/2024 in #djs-questions
DiscordJS V14 not catching Event "MessageCreate"
const { Client, GatewayIntentBits, Message } = require('discord.js');
const { token } = require('./config.json');

const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.DirectMessages, GatewayIntentBits.MessageContent] });

client.on("ready", function(){
console.log(`the client becomes ready to start`);
console.log(`I am ready! Logged in as ${client.user.tag}!`);
});

client.on("messageCreate", function(message){
console.log(`a message was created`);
console.log({message});
});


client.login(token);
const { Client, GatewayIntentBits, Message } = require('discord.js');
const { token } = require('./config.json');

const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.DirectMessages, GatewayIntentBits.MessageContent] });

client.on("ready", function(){
console.log(`the client becomes ready to start`);
console.log(`I am ready! Logged in as ${client.user.tag}!`);
});

client.on("messageCreate", function(message){
console.log(`a message was created`);
console.log({message});
});


client.login(token);
34 replies