Triangle.js Docs
    Preparing search index...

    Interface User

    interface User {
        _id: string;
        achievements: number[];
        ar: number;
        ar_counts: {
            "1"?: number;
            "100"?: number;
            "2"?: number;
            "3"?: number;
            "4"?: number;
            "5"?: number;
            t10?: number;
            t100?: number;
            t25?: number;
            t3?: number;
            t5?: number;
            t50?: number;
        };
        avatar_revision?: number;
        badges: { group?: string; id: string; label: string; ts?: string }[];
        badstanding?: boolean;
        banner_revision?: number;
        bio?: string;
        botmaster?: string;
        connections: {
            discord?: { display_username: string; id: string; username: string };
            reddit?: { display_username: string; id: string; username: string };
            steam?: { display_username: string; id: string; username: string };
            twitch?: { display_username: string; id: string; username: string };
            twitter?: { display_username: string; id: string; username: string };
            youtube?: { display_username: string; id: string; username: string };
        };
        country?: string;
        distinguishment?: { type: string };
        friend_count: number;
        gamesplayed: number;
        gameswon: number;
        gametime: number;
        oldusernames: { ts?: number; username: string }[];
        role:
            | "user"
            | "banned"
            | "bot"
            | "halfmod"
            | "mod"
            | "admin"
            | "sysop"
            | "anon"
            | "hidden";
        supporter: boolean;
        supporter_tier: number;
        ts?: string;
        username: string;
        xp: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    _id: string

    The user's internal ID.

    achievements: number[]

    This user's featured achievements. Up to three integers which correspond to Achievement IDs.

    ar: number

    This user's Achievement Rating.

    ar_counts: {
        "1"?: number;
        "100"?: number;
        "2"?: number;
        "3"?: number;
        "4"?: number;
        "5"?: number;
        t10?: number;
        t100?: number;
        t25?: number;
        t3?: number;
        t5?: number;
        t50?: number;
    }

    The breakdown of the source of this user's Achievement Rating:

    Type Declaration

    • Optional1?: number

      The amount of ranked Bronze achievements this user has.

    • Optional100?: number

      The amount of ranked Issued achievements this user has.

    • Optional2?: number

      The amount of ranked Silver achievements this user has.

    • Optional3?: number

      The amount of ranked Gold achievements this user has.

    • Optional4?: number

      The amount of ranked Platinum achievements this user has.

    • Optional5?: number

      The amount of ranked Diamond achievements this user has.

    • Optionalt10?: number

      The amount of competitive achievements this user has ranked into the top 10 with.

    • Optionalt100?: number

      The amount of competitive achievements this user has ranked into the top 100 with.

    • Optionalt25?: number

      The amount of competitive achievements this user has ranked into the top 25 with.

    • Optionalt3?: number

      The amount of competitive achievements this user has ranked into the top 3 with.

    • Optionalt5?: number

      The amount of competitive achievements this user has ranked into the top 5 with.

    • Optionalt50?: number

      The amount of competitive achievements this user has ranked into the top 50 with.

    avatar_revision?: number

    This user's avatar ID. Get their avatar at https://tetr.io/user-content/avatars/{ USERID }.jpg?rv={ AVATAR_REVISION }

    badges: { group?: string; id: string; label: string; ts?: string }[]

    The user's badges:

    Type Declaration

    • Optionalgroup?: string

      The badge's group ID. If multiple badges have the same group ID, they are rendered together.

    • id: string

      The badge's internal ID, and the filename of the badge icon (all PNGs within /res/badges/). Note that badge IDs may include forward slashes. Please do not encode them! Follow the folder structure.

    • label: string

      The badge's label, shown when hovered.

    • Optionalts?: string

      The badge's timestamp, if shown.

    badstanding?: boolean

    Whether this user currently has a bad standing (recently banned).

    banner_revision?: number

    This user's banner ID. Get their banner at https://tetr.io/user-content/banners/{ USERID }.jpg?rv={ BANNER_REVISION }. Ignore this field if the user is not a supporter.

    bio?: string

    This user's "About Me" section. Ignore this field if the user is not a supporter.

    botmaster?: string

    If this user is a bot, the bot's operator.

    connections: {
        discord?: { display_username: string; id: string; username: string };
        reddit?: { display_username: string; id: string; username: string };
        steam?: { display_username: string; id: string; username: string };
        twitch?: { display_username: string; id: string; username: string };
        twitter?: { display_username: string; id: string; username: string };
        youtube?: { display_username: string; id: string; username: string };
    }

    This user's third party connections:

    Type Declaration

    • Optionaldiscord?: { display_username: string; id: string; username: string }

      This user's connection to Discord:

      • display_username: string

        Same as username.

      • id: string

        This user's Discord ID.

      • username: string

        This user's Discord username.

    • Optionalreddit?: { display_username: string; id: string; username: string }

      This user's connection to Reddit:

      • display_username: string

        Same as username.

      • id: string

        This user's Reddit user ID.

      • username: string

        This user's Reddit username.

    • Optionalsteam?: { display_username: string; id: string; username: string }

      This user's connection to Steam:

      • display_username: string

        Same as username.

      • id: string

        This user's SteamID.

      • username: string

        This user's Steam display name.

    • Optionaltwitch?: { display_username: string; id: string; username: string }

      This user's connection to Twitch:

      • display_username: string

        This user's Twitch display name (may include Unicode).

      • id: string

        This user's Twitch user ID.

      • username: string

        This user's Twitch username (as used in the URL).

    • Optionaltwitter?: { display_username: string; id: string; username: string }

      This user's connection to X (kept in the API as twitter for readability):

      • display_username: string

        This user's X display name (may include Unicode).

      • id: string

        This user's X user ID.

      • username: string

        This user's X handle (as used in the URL).

    • Optionalyoutube?: { display_username: string; id: string; username: string }

      This user's connection to YouTube:

      • display_username: string

        Same as username.

      • id: string

        This user's YouTube user ID (as used in the URL).

      • username: string

        This user's YouTube display name.

    country?: string

    The user's ISO 3166-1 country code, or null if hidden/unknown. Some vanity flags exist.

    distinguishment?: { type: string }

    This user's distinguishment banner, if any. Must at least have:

    Type Declaration

    • type: string

      The type of distinguishment banner.

    friend_count: number

    The amount of players who have added this user to their friends list.

    gamesplayed: number

    The amount of online games played by this user. If the user has chosen to hide this statistic, it will be -1.

    gameswon: number

    The amount of online games won by this user. If the user has chosen to hide this statistic, it will be -1.

    gametime: number

    The amount of seconds this user spent playing, both on- and offline. If the user has chosen to hide this statistic, it will be -1.

    oldusernames: { ts?: number; username: string }[]

    The user's previous usernames

    Type Declaration

    • Optionalts?: number

      The time at which the user changed their username away from this username.

    • username: string

      The username the user used.

    role:
        | "user"
        | "banned"
        | "bot"
        | "halfmod"
        | "mod"
        | "admin"
        | "sysop"
        | "anon"
        | "hidden"

    The user's role (one of "anon", "user", "bot", "halfmod", "mod", "admin", "sysop", "hidden", "banned").

    supporter: boolean

    Whether this user is currently supporting TETR.IO <3

    supporter_tier: number

    An indicator of their total amount supported, between 0 and 4 inclusive.

    ts?: string

    When the user account was created. If not set, this account was created before join dates were recorded.

    username: string

    The user's username.

    xp: number

    The user's XP in points.