what should I do if I want to print the string that the user entered in the discord chat ...
client.on('interactionCreate', (interaction) => {
interaction.reply(????)
});
8 Replies
- 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!messages aren't interactions, u gotta use messageCreate event
and what argument should I pass
I just started learning discord js
Well the message object is included in the callback of messageCreate event, so pass that
For docs, pls refer to what lavaboy sent above ^
For receiving
messageCreate
event you must provide guild messages intent
And for content you also need to provide message content intent