{"size": 364, "ext": "js", "max_stars_repo_path": "src/commands/owner/reboot.js", "max_stars_repo_name": "idk-pixel/SpeckyBot", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/commands/owner/reboot.js", "max_issues_repo_name": "idk-pixel/SpeckyBot", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/commands/owner/reboot.js", "max_forks_repo_name": "idk-pixel/SpeckyBot", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.3333333333, "max_line_length": 54, "alphanum_fraction": 0.6071428571}
module.exports = {
    name: "reboot",
    description: "Reboots the bot down!",
    category: "owner"
}

const { join } = require('path');

module.exports.run = async (bot, msg) => {

    // Remove Listeners
    bot.removeAllListeners();

    // Destroys Bot
    bot.destroy();

    delete require.cache;

    return require(join(process.cwd(),'bot.js'))(bot);
}
