Slash and message commands.

Can I make a slash command and a message command in the same archive?
9 Replies
Favna
Favna15mo ago
yes
Eduardo
Eduardo15mo ago
how it works? @Favna
Favna
Favna15mo ago
By having both a messageRun and chatInputRun method in the same file
Eduardo
Eduardo15mo ago
ok I have this, but it doesn't work
Eduardo
Eduardo15mo ago
Eduardo
Eduardo15mo ago
the bot emits the MessageCreate event
Spinel
Spinel15mo ago
- Which version of @sapphire/framework are you using? - What's your file/folder structure? - Did you use the CLI to generate your bot? - What's your "main" property in package.json - Are you using TypeScript? And if so, how are you compiling and running your code? That is to say, what are your build and startup scripts? - In case you are using version 3.0.0 or higher of @sapphire/framework, and your problem related to message commands, did you add loadMessageCommandListeners to your SapphireClient options Remember that if you are new to @sapphire/framework it is important that you read the user guide.
Favna
Favna15mo ago
last point ThisPoint do you the correct intents Guilds, GuildMessages and MessageContent I said last point
Eduardo
Eduardo15mo ago
Oh, I didn't see I'm sorry now it works, thank you so much