why won't my commands send?

client.on('message', message => {
if (!message.content.startsWith(prefix) || message.auther.bot) return;

const args = message.content.slice(prefix.length).split(/ +/);
const command = args.shift().toLowerCase();

//test cmd

if (command === 'test'){
message.channel.send('The Bot is working!')
}
})
client.on('message', message => {
if (!message.content.startsWith(prefix) || message.auther.bot) return;

const args = message.content.slice(prefix.length).split(/ +/);
const command = args.shift().toLowerCase();

//test cmd

if (command === 'test'){
message.channel.send('The Bot is working!')
}
})
9 Replies
d.js toolkit
d.js toolkit11mo 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!
monbrey
monbrey11mo ago
message isnt an event, messageCreate is auther is spelled incorrectly, => author And I can't guarantee you have the right intents for any of this
! Felixx
! FelixxOP11mo ago
ok let me try those still nothing
wen
wen11mo ago
what did u change
monbrey
monbrey11mo ago
Should probably be using slash commands anyway
! Felixx
! FelixxOP11mo ago
how do i do that?
wen
wen11mo ago
read guide
d.js docs
d.js docs11mo ago
:guide: Creating Your Bot: Creating slash commands read more
! Felixx
! FelixxOP11mo ago
ok let me go read it
Want results from more Discord servers?
Add your server