Making a /command

Hi, how would I go about making a command where any .js file in the folder /commands gets registered, and how do I register commands? I can’t get them to work. I want it to be guild only.
Was this page helpful?