Retrieve which subcommand was ran from message and interaction
Ive been wondering if it is possible to retrieve which subcommand was ran or to get only the arg without the command/subcommand from the message? I could manually have it set to a value for each subcommand but i wanted to know if i can already retrieve that from a preexisting sapphire object
5 Replies
Is
interaction.options.getSubcommand()
what you're looking for?does it have a message command variant?
sorry im at work rn
You could probably do
message.content.split(/ +/)[1]
.
Or look into the source code and see how it classifies the subcommand originallyyeah sounds good, ill do that, thanks
It's not provided from the lib so you'll have to do something like what Lioness suggested