'Returns the first PermissionGroup a user belongs to
:param user: A discord User or Member object'

def for_user(self, user):

    for group in self.groups:
        if (user.id in group.user_list):
            return group
    if (type(user) == discord_User):
        return self.default_group
    for group in self.groups:
        for role in user.roles:
            if (role.id in group.granted_to_roles):
                return group
    return self.default_group
