{"size": 1069, "ext": "js", "max_stars_repo_path": "src/commands/ADM/help.js", "max_stars_repo_name": "Vulpon/ExecutiveMerman", "max_stars_repo_stars_event_min_datetime": "2019-08-11T06:06:58.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-23T02:27:51.000Z", "max_issues_repo_path": "src/commands/ADM/help.js", "max_issues_repo_name": "danielnaoexiste/ExecutiveMerman", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/commands/ADM/help.js", "max_forks_repo_name": "danielnaoexiste/ExecutiveMerman", "max_forks_repo_forks_event_min_datetime": "2019-05-30T23:34:25.000Z", "max_forks_repo_forks_event_max_datetime": "2019-05-30T23:34:25.000Z"}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 24.2954545455, "max_line_length": 80, "alphanum_fraction": 0.5182413471}
const glob = require("glob");
const path = require("path");

module.exports.run = async (bot, message, args) => {
    let bicon = bot.user.displayAvatarURL;
    
    // Message Embed
    let embed = {
        color: 0x466ba,
        title: `**Commands**`,
        thumbnail: {
            url: bicon
        },
        description: `Available commands`,
        footer: { text: "Feito com <3 para a Dev-U" },
        fields: [] 
    }
    
    // Runs through the commands and adds their name an description to the embed
    glob.sync("./src/commands/**/*.js").forEach(function(file){
        let i = 0;
        let props = require(path.resolve(file))
        embed.fields.push(
            {
                name: `**${props.help.name}**`,
                value: `${props.help.description}`
            }
        )
            
    });
    
    // Sends the Log
    message.channel.send({embed});
        
    console.log("Help Sent!");
    
    return message.react("👍");

}

module.exports.help = {
    name: "help",
    description: "Shows all available commands"
}