{"size": 797, "ext": "js", "max_stars_repo_path": "src/inhibitors/blacklist/userGlobalBlacklist.js", "max_stars_repo_name": "StrangerGithuber/Roomba-V2", "max_stars_repo_stars_event_min_datetime": "2021-09-02T18:59:57.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-06T22:30:00.000Z", "max_issues_repo_path": "src/inhibitors/blacklist/userGlobalBlacklist.js", "max_issues_repo_name": "StrangerGithuber/Roomba-V2", "max_issues_repo_issues_event_min_datetime": "2021-12-06T12:52:45.000Z", "max_issues_repo_issues_event_max_datetime": "2021-12-31T00:04:31.000Z", "max_forks_repo_path": "src/inhibitors/blacklist/userGlobalBlacklist.js", "max_forks_repo_name": "StrangerGithuber/Roomba-V2", "max_forks_repo_forks_event_min_datetime": "2021-12-06T22:30:08.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-06T22:30:08.000Z"}
{"max_stars_count": 2, "max_issues_count": 9, "max_forks_count": 1, "avg_line_length": 33.2083333333, "max_line_length": 94, "alphanum_fraction": 0.6424090339}
const { Inhibitor } = require('discord-akairo');

class UserGlobalBlacklistInhibitor extends Inhibitor {
    constructor() {
        super('userGlobalBlacklist', {
            reason: 'vous êtes blacklisté du administration',
            type: "post",
            priority: 1
        })
    }

    async exec(message) {
        let blacklist = await this.client.moderation.getSettingRecursively("blacklist.users");
        if (blacklist === undefined || null){
            await this.client.moderation.create();
            blacklist = await this.client.moderation.getSettingRecursively("blacklist.users");
        }
        if (message.author.id === process.env.OWNER_ID) return false;
        return blacklist.includes(message.author.id);
    }

}

module.exports = UserGlobalBlacklistInhibitor;