I am currently trying to build a discord.js bot that links to an NBA api in order to output statistics when requested. I am able to connect to the api and output my results eg. /seasons will output all seasons on record.
What i am now trying to achieve is a command such as /player-stats [player name] which will then output the stats of the requested player but i am unable to find a way to register the argument (players name) along with the command (/player-stats).
Any help would be greatly appreciated.
It is possible to add arguments in interaction commands.
If you are new you can use a gui for making slash commands also
https://slash-commands-gui.androz2091.fr/
You can get help from here also https://www.youtube.com/watch?v=pXehoXnFxPM