why isnt the command not working

const { Client, Events, GatewayIntentBits } = require('discord.js');
const { token } = "MTE4MTcyMDE2MzYyNDY4NTU4OA.GGJWB-.jDve_yeVH5mxEKITIbwhkoBglccWMOAdKWcvTw"

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

prefix = "."
client.on("message", message => {
if (message.content.startsWith(prefix + "ping")) {
console.log("2349")
message.channel.send('Pong! :Pingsock:');
}
});

client.once(Events.ClientReady, readyClient => {
console.log(`Ready! Logged in as ${readyClient.user.tag}`);
});
console.log("works");


client.login("MTE4MTcyMDE2MzYyNDY4NTU4OA.GGJWB-.jDve_yeVH5mxEKITIbwhkoBglccWMOAdKWcvTw");
const { Client, Events, GatewayIntentBits } = require('discord.js');
const { token } = "MTE4MTcyMDE2MzYyNDY4NTU4OA.GGJWB-.jDve_yeVH5mxEKITIbwhkoBglccWMOAdKWcvTw"

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

prefix = "."
client.on("message", message => {
if (message.content.startsWith(prefix + "ping")) {
console.log("2349")
message.channel.send('Pong! :Pingsock:');
}
});

client.once(Events.ClientReady, readyClient => {
console.log(`Ready! Logged in as ${readyClient.user.tag}`);
});
console.log("works");


client.login("MTE4MTcyMDE2MzYyNDY4NTU4OA.GGJWB-.jDve_yeVH5mxEKITIbwhkoBglccWMOAdKWcvTw");
13 Replies
d.js toolkit
d.js toolkit12mo 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
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs12mo ago
If you aren't getting content, embeds or attachments of a message, make sure you have the MessageContent intent enabled in the Developer Portal and provide it to your client:
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent]
});
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent]
});
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs12mo ago
Tag suggestion for @qtrmdmr: - Visit the Discord developer application dashboard and select the corresponding application - Click on "Bot" on the left side - Click the "Reset Token" button and (if enabled) enter your 2FA code on the popup
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
qr
qrOP12mo ago
disord has a new feature and it resets it for u each time u leak it
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
qr
qrOP12mo ago
didnt mean to will try what u sent now thanks it works @Jô 🌈🦄
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
qr
qrOP12mo ago
@Jô 🌈🦄 although command doesnt work doesnt do anything and i had a console log and it didnt log anything when i did .ping
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
qr
qrOP12mo ago
omds thank you finaly
Want results from more Discord servers?
Add your server