NewsData:
    | {
        leaderboard: {
            gametype: string;
            rank: number;
            replayid: string;
            result: number;
            username: string;
        };
    }
    | {
        personalbest: {
            gametype: string;
            replayid: string;
            result: number;
            username: string;
        };
    }
    | {
        badge: {
            label: string;
            type: string;
            username: string;
        };
    }
    | {
        rankup: {
            rank: string;
            username: string;
        };
    }
    | {
        supporter: {
            username: string;
        };
    }
    | {
        supporter_gift: {
            username: string;
        };
    }

News data may be stored in different formats depending on the type of news item. Here's all the types with their data structures.

Type declaration

  • leaderboard: {
        gametype: string;
        rank: number;
        replayid: string;
        result: number;
        username: string;
    }

    When a user's new personal best enters a global leaderboard. Seen in the global stream only.

    • gametype: string

      The game mode played.

    • rank: number

      The global rank achieved.

    • replayid: string

      The replay's shortID.

    • result: number

      The result (score or time) achieved.

    • username: string

      The username of the person who got the leaderboard spot.

Type declaration

  • personalbest: {
        gametype: string;
        replayid: string;
        result: number;
        username: string;
    }

    When a user gets a personal best. Seen in user streams only.

    • gametype: string

      The game mode played.

    • replayid: string

      The replay's shortID.

    • result: number

      The result (score or time) achieved.

    • username: string

      The username of the player.

Type declaration

  • badge: {
        label: string;
        type: string;
        username: string;
    }

    When a user gets a badge. Seen in user streams only.

    • label: string

      The badge's label.

    • type: string

      The badge's internal ID, and the filename of the badge icon (all PNGs within /res/badges/)

    • username: string

      The username of the player.

Type declaration

  • rankup: {
        rank: string;
        username: string;
    }

    When a user gets a new top rank in TETRA LEAGUE. Seen in user streams only.

    • rank: string

      The new rank.

    • username: string

      The username of the player.

Type declaration

  • supporter: {
        username: string;
    }

    When a user gets TETR.IO Supporter. Seen in user streams only.

    • username: string

      The username of the player.

Type declaration

  • supporter_gift: {
        username: string;
    }

    When a user is gifted TETR.IO Supporter. Seen in user streams only.

    • username: string

      The username of the recipient.