help with simple ping command ;-;

User this is my code const { Client, IntentsBitField } = require ('discord.js');
const client = new Client({
intents: [
IntentsBitField.Flags.Guilds,
IntentsBitField.Flags.GuildMembers,
IntentsBitField.Flags.GuildMessages,
IntentsBitField.Flags.MessageContent,
],
});

client.on('ready', (c) => {
console.log('bot is online.'); //you can use ${user.tag.id(or .tag or smth)} to mention the bot like console.log(`${user.tag.id} is online.`);
});

client.login('nuggets');
const client = new Client({
intents: [
IntentsBitField.Flags.Guilds,
IntentsBitField.Flags.GuildMembers,
IntentsBitField.Flags.GuildMessages,
IntentsBitField.Flags.MessageContent,
],
});

client.on('ready', (c) => {
console.log('bot is online.'); //you can use ${user.tag.id(or .tag or smth)} to mention the bot like console.log(`${user.tag.id} is online.`);
});

client.login('nuggets');
how do i add command in it to reply to a message ?tag ping as pong
3 Replies
d.js toolkit
d.js toolkit8mo 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
d.js docs
d.js docs8mo ago
:guide: Creating Your Bot: Creating slash commands read more
f(x) = 1/x
f(x) = 1/xOP8mo ago
no not slah commands ik how to create for slash commands, but for normal textual command like old one !help
this is your help take it
this is your help take it
but, i do feel more comfortable with writing ?tag functions than to do slah command function to get what to know is a function, i mean the ?tag thing feels more like to me sure, thanks!
Want results from more Discord servers?
Add your server