How do I make / commands node.js

I dont know how to make / commands so i need help

You are viewing a single comment. View All

Actually, it can be easier. What you do is make a folder with all commands called "commands", then create
a file called deploy-commands.js Now, to create a command, in your "commands" folder, create a file called ping.js type the following:
module.exports = function(){
Then, in your deploy commands, you type
const ping = require("./commands/ping.js")
clist = {ping}
module.exports = async function(msg){
let tokens = msg.toString().split(" ");
let command = tokens.shift();
if (command.charAt(0) == '!') {
command = command.substring(1);
clist[command](msg, tokens);
Finally, index.js:
//depencencies,on ready, etc
const commhand = require("./deploy-commands.js")
This is assuming it is blank, new file.
It also appears that you are missing function(msg,args) in your files.