{"size": 570, "ext": "js", "max_stars_repo_path": "src/functions/Funcs/misc/eventEmit.js", "max_stars_repo_name": "Coke67/coke.js", "max_stars_repo_stars_event_min_datetime": "2022-03-21T09:39:08.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-21T09:39:08.000Z", "max_issues_repo_path": "src/functions/Funcs/misc/eventEmit.js", "max_issues_repo_name": "Coke67/coke.js", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/functions/Funcs/misc/eventEmit.js", "max_forks_repo_name": "Coke67/coke.js", "max_forks_repo_forks_event_min_datetime": "2022-03-23T01:22:51.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-23T01:22:51.000Z"}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 25.9090909091, "max_line_length": 121, "alphanum_fraction": 0.5578947368}
module.exports = async d => {
    const data = d.util.openFunc(d);
    if (data.err) return d.error(data.err);
    if (!d.client.customEvents) return d.aoiError.fnError(d.func, "custom", {}, "CustomEvent Class Was Not Initialised");

    let [name, ...datas] = data.inside.splits;
    name = name.addBrackets();
    datas = datas.map(x => {
        try {
            return JSON.parse(x)
        } catch (e) {
            return x
        }
    });

    data.result = d.client.customEvents.emit(name, ...datas);

    return {
        code: d.util.setCode(data)
    }
} 
