Answer the question
In order to leave comments, you need to log in
How to make Discord bot read multiple commands in one file?
Good evening, the structure for each new command I have is this:
const Discord = module.require("discord.js");
const fs = require("fs");
module.exports.run = async (robot,message,args) => {
// содержимое
};
module.exports.help = {
name: "название_команды"
};
Answer the question
In order to leave comments, you need to log in
I suggest you just do this:
switch(command){
case "help":
// code
break;
default:
// Command is undefined
break;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question