<commit_before>var p = {}
try {
	p.permissions = require("./permissions.json");
} catch (e) {
	throw "Cannot find \"permissions.json\"";
}

p.userHasPermission = function (user, server, command) {
    var userRoles = server.getUserRoles(user);

    if (!p.serverExists(server))
        return false;

    if (!p.commandExistsForServer(server,command))
        return false;

    if (p.userDefinedForCommand(command, user))
        return p.permissions[server.id][command][users][user.id];

    var highestRole = undefined;
    for (var role in userRoles) {
        if (!p.roleDefinedForCommand(command, role))
            continue;<commit_msg>Gave server owners full permissions<commit_after>var p = {}
try {
	p.permissions = require("./permissions.json");
} catch (e) {
	throw "Cannot find \"permissions.json\"";
}

p.userHasPermission = function (user, server, command) {
    if (user.id === server.owner.id)
        return true;

    var userRoles = server.getUserRoles(user);
    
    if (!p.serverExists(server))
        return false;

    if (!p.commandExistsForServer(server,command))
        return false;

    if (p.userDefinedForCommand(command, user))
        return p.permissions[server.id][command][users][user.id];

    var highestRole = undefined;
    for (var role in userRoles) {
        if (!p.roleDefinedForCommand(command, role))
            continue;
{'fraction_non_alphanumeric': 0.1349380014587892, 'fraction_numerical': 0.0, 'mean_word_length': 3.2476780185758516, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1411008', 'n_tokens_mistral': 429, 'n_tokens_neox': 419, 'n_words': 98}