#Slash and message commands.

1 messages · Page 1 of 1 (latest)

simple quarry
#

Can I make a slash command and a message command in the same archive?

cursive flareBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

hard reef
#

yes

simple quarry
#

how it works?

#

@hard reef

hard reef
#

By having both a messageRun and chatInputRun method in the same file

simple quarry
#

ok

#

I have this, but it doesn't work

#

the bot emits the MessageCreate event

spice swanBOT
#
  • 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.

hard reef
#

last point ThisPoint

#

and do you the correct intents

#

Guilds, GuildMessages and MessageContent

#

I said last point

simple quarry
#

Oh, I didn't see

#

I'm sorry