Veeru
Veeru
DIAdiscord.js - Imagine an app
Created by Veeru on 9/15/2023 in #djs-questions
Using the base command and the subcommand as well
Hey! I am currently migrating an old bot to use slash commands but I am currently stuck with the following issue. I am browsing the Discord Dev Portal docs regarding subcommands and subcommand groups and read this line:
Using subcommands or subcommand groups will make your base command unusable.
I have a command that is currently being used in the legacy (prefix-based system): - -shop - returns a link - -shop buy <ITEM_ID> - adds an item to inventory I was wondering if there would be a decent way of migrating this to slash commands. I considered using options and checking if option one is "buy" then validated option two "<ITEM_ID>" and both of them being optional so we could also continue to use -shop alone. This, however, doesn't feel like a graceful solution. Are there any recommendations of how this could be achieved? EDIT: using v14.5.0 but that isn't available as a tag. Node v18.6.1.
5 replies