bot answer
i wanna make when i ping my bot it answeer but its not
24 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!
- ✅
Marked as resolved by staffdo you have the GuildMessages intent
ywes
and MessageContent
use that too
yes
start by using this
and also log to see if your event fires at all
no err on log
aswell
im using onMessageCreate event
show your full code
800 lines
but still log to see if your event fires at all
consider a proper command handler then
If you aren't getting any errors, try to place
console.log
checkpoints throughout your code to find out where execution stops.
- Once you do, log relevant values and if-conditions
- More sophisticated debugging methods are breakpoints and runtime inspections: learn morei can send the cmd
if (message.content ===
<@${client.user.id}>
) {
try {
await message.reply({
content: Hi! My prefix is \
/` or `+`. Use the `+help` command to explore my features!`,
ephemeral: false, // Makes the message visible to everyone
});
} catch (error) {
console.error("Eror:", error);
@treble/lunaso you changed nothing
you didnt ask ai did you
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
bruh
start by doing this
debugging is basic js
k
worked like that
sounds like the message's content wasn't exactly only the bot's mention
thats why i told you to use MessageMentions
ok
thx