Class User

Represents a TetraChannel User.

Constructors

Properties

avatarRevision?: number

This user's avatar ID.

badStanding?: boolean

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

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

The user's badges.

Type declaration

  • id: string

    The badge's internal ID, and the filename of the badge icon.

    Remarks

    All PNGs within /res/badges/.

  • label: string

    The badge's label, shown when hovered.

  • Optional ts?: Date

    The badge's timestamp, if shown.

bannerRevision?: number

This user's banner ID.

bio?: string

This user's "About Me" section.

botMaster?: string

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

connections: {
    discord?: {
        id: string;
        username: string;
    };
}

This user's third party connections.

Type declaration

  • Optional discord?: {
        id: string;
        username: string;
    }

    This user's connection to Discord.

    • id: string

      This user's Discord ID.

    • username: string

      This user's Discord Tag.

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.

Type declaration

  • type: string

    The type of distinguishment banner.

friendCount: number

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

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.

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 wl be -1.

id: string

The user's internal ID.

league: {
    apm?: number;
    bestRank: string;
    decaying: boolean;
    gamesPlayed: number;
    gamesWon: number;
    glicko?: number;
    nextAt: number;
    nextRank?: string;
    percentile: number;
    percentileRank: string;
    pps?: number;
    prevAt: number;
    prevRank?: string;
    rank: string;
    rating: number;
    rd?: number;
    standing: number;
    standingLocal: number;
    vs?: number;
}

This user's current TETRA LEAGUE standing.

Type declaration

  • Optional apm?: number

    This user's average APM (attack per minute) over the last 10 games.

  • bestRank: string

    This user's highest achieved rank this season.

  • decaying: boolean

    Whether this user's RD is rising (has not played in the last week).

  • gamesPlayed: number

    The amount of TETRA LEAGUE games played by this user.

  • gamesWon: number

    The amount of TETRA LEAGUE games won by this user.

  • Optional glicko?: number

    This user's Glicko-2 rating.

  • nextAt: number

    The position of the best player in the user's current rank, surpass them to go up a rank. -1 if unranked (or the best rank).

  • Optional nextRank?: string

    The next rank this user can achieve, if they win more games, or null if unranked (or the best rank).

  • percentile: number

    This user's percentile position (0 is best, 1 is worst).

  • percentileRank: string

    This user's percentile rank, or Z if not applicable.

  • Optional pps?: number

    This user's average PPS (piece per second) over the last 10 games.

  • prevAt: number

    The position of the worst player in the user's current rank, dip below them to go down a rank. -1 if unranked (or the worst rank).

  • Optional prevRank?: string

    The previous rank this user can achieve, if they lose more games, or null if unranked (or the worst rank).

  • rank: string

    This user's letter rank. Z is unranked.

  • rating: number

    This user's TR (Tetra Rating), or -1 if less than 10 games were played.

  • Optional rd?: number

    This user's Glicko-2 Rating Deviation. If over 100, this user is unranked.

  • standing: number

    This user's position in global leaderboards, or -1 if not applicable.

  • standingLocal: number

    This user's position in local leaderboards, or -1 if not applicable.

  • Optional vs?: number

    This user's average VS (versus score) over the last 10 games.

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

The user's role.

supporter: boolean

Whether this user is currently supporting TETR.IO <3

supporterTier: number

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

ts?: Date

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

username: string

The user's username.

verified: boolean

Whether this user is a verified account.

ws: default
xp: number

The user's XP in points.

Accessors

  • get avatarURL(): undefined | string
  • A link to the user's avatar if they have one.

    Returns undefined | string

  • get bannerURL(): undefined | string
  • A link to the user's banner if they have one.

    Returns undefined | string

Methods

  • Send a direct message to this user.

    Parameters

    • msg: string

      The content of the message to send

    Returns void

    Example

    indonesia.send("Hello World!");
    
  • Send an invite to the this user of the client's current room.

    Returns void

Generated using TypeDoc