Passing down from the index.ts and arguments to subcommands
I have two Issues:
1. I want to use Firestore which I'm initilizing in the index.ts but I dont know how to access variables from the index.ts in my command folders.
2. How do I access arguments for subcommands?
Here is my code for the second issue:
Solution:Jump to solution
As for firestore, you can either put it into client's container store
Or initialise firestore in seperate file, export the firestore object/database.
Then import it where you need...
3 Replies
You will need to set options inside subcommand
Which you can access by
interaction.options.getString('option_name')
(this is just an example)Solution
As for firestore, you can either put it into client's container store
Or initialise firestore in seperate file, export the firestore object/database.
Then import it where you need
Works perfectly thanks :D