This is the Most Advance Explaination on slash commands in discord.js
Note that discord.js doesn't officially support using client.api, this is basically just a workaround until they release complete support. Do not ask for help with client.api in the discord.js server.
Note that slash commands won't show in a server unless that server has authorized it with the applications.commands
oauth2 scope (not just the bot
scope).
This does not require a discord.js update! It should work as long as you're using discord.js v12 it will work fine.