<commit_before>import { Player, PlayerInfo, Ranks } from "hive-api"
import { PlayerInfoLeaderboardUpdater } from "./LeaderboardUpdater"
import { UpdateService } from "./UpdateService"
import { database } from "firebase-admin";

export class TokenUpdater extends PlayerInfoLeaderboardUpdater {
    static readonly BLOCKED_RANKS = [Ranks.VIP, Ranks.DEVELOPER, Ranks.OWNER, Ranks.YOUTUBER, Ranks.STREAMER, Ranks.CONTRIBUTOR];
    get id() { return `leaderboard_tokens`; }

    constructor(db: database.Database) {
        super(db.ref("tokenLeaderboard"), "tokens", 200);
    }

    update(info: PlayerInfo) {
        if (TokenUpdater.BLOCKED_RANKS.filter(rank => rank.name == info.rank.name).length == 0) {
            this._dataRef.child(info.uuid).update({
                tokens: info.tokens,
                name: info.name
            });
        } else {<commit_msg>removed staffmanager from tokenupdater<commit_after>import { Player, PlayerInfo, Ranks } from "hive-api"
import { PlayerInfoLeaderboardUpdater } from "./LeaderboardUpdater"
import { UpdateService } from "./UpdateService"
import { database } from "firebase-admin";

export class TokenUpdater extends PlayerInfoLeaderboardUpdater {
    static readonly BLOCKED_RANKS = [Ranks.VIP, Ranks.DEVELOPER, Ranks.OWNER, Ranks.STAFFMANAGER, Ranks.YOUTUBER, Ranks.STREAMER, Ranks.CONTRIBUTOR];
    get id() { return `leaderboard_tokens`; }

    constructor(db: database.Database) {
        super(db.ref("tokenLeaderboard"), "tokens", 200);
    }

    update(info: PlayerInfo) {
        if (TokenUpdater.BLOCKED_RANKS.filter(rank => rank.name == info.rank.name).length == 0) {
            this._dataRef.child(info.uuid).update({
                tokens: info.tokens,
                name: info.name
            });
        } else {
{'fraction_non_alphanumeric': 0.12212885154061624, 'fraction_numerical': 0.004481792717086834, 'mean_word_length': 3.314009661835749, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4768508', 'n_tokens_mistral': 567, 'n_tokens_neox': 555, 'n_words': 112}