----- help.js ----
exports.run = async (command_s, Discord, message, client) => {
// temporal
const command = "profile";
function string(){
try{x = require('./commands/utility/${command}'+'.js'); var result = x;return result;}catch(err){};
try{y = require('./command/fun/${command}'+'.js'); var result = y;return result;}catch(err){};
}
const x = await string()
console.log(x)
const final_message = x.info()
console.log(final_message)
}
I want to make a system that checks in which "folder" the file is located by means of a try / catch, but when calling the variable 'result' it returns me: "undefined". Then I want to be able to call from that var "x" the function 'info ()', which returns a string: ------ profile.js -----
function info(){
return "Obtén la información sobre tu perfil"}