Variable TetraChannelConst

TetraChannel: {
    cache: Map<string, any>;
    general: {
        activity: (() => Promise<GeneralActivityType>);
        stats: (() => Promise<GeneralStatsType>);
    };
    leaderboards: {
        league: ((after?, before?, limit?, country?) => Promise<LeagueLeaderboardUserInfoType[]>);
        leagueFull: ((country?) => Promise<LeagueLeaderboardUserInfoType[]>);
    };
    misc: {
        allNews: ((limit?) => Promise<LatestNewsType[]>);
        news: ((stream, limit?) => Promise<LatestNewsType[]>);
        stream: ((stream) => Promise<RecordType[]>);
    };
    users: {
        info: ((user) => Promise<UserInfoType>);
        records: ((user) => Promise<UserRecordsType>);
        search: ((query) => Promise<UserSearchType | undefined>);
    };
} = ...

Type declaration

  • cache: Map<string, any>
  • general: {
        activity: (() => Promise<GeneralActivityType>);
        stats: (() => Promise<GeneralStatsType>);
    }
    • activity: (() => Promise<GeneralActivityType>)
        • (): Promise<GeneralActivityType>
        • Returns Promise<GeneralActivityType>

          Description

          A graph of user activity over the last 2 days. A user is seen as active if they logged in or received XP within the last 30 minutes.

    • stats: (() => Promise<GeneralStatsType>)
        • (): Promise<GeneralStatsType>
        • Returns Promise<GeneralStatsType>

          Description

          Some statistics about the service.

  • leaderboards: {
        league: ((after?, before?, limit?, country?) => Promise<LeagueLeaderboardUserInfoType[]>);
        leagueFull: ((country?) => Promise<LeagueLeaderboardUserInfoType[]>);
    }
    • league: ((after?, before?, limit?, country?) => Promise<LeagueLeaderboardUserInfoType[]>)
        • (after?, before?, limit?, country?): Promise<LeagueLeaderboardUserInfoType[]>
        • Parameters

          • Optional after: number

            The upper bound in TR. Use this to paginate downwards: take the lowest seen TR and pass that back through this field to continue scrolling. 25000 by default.

          • Optional before: number

            The lower bound in TR. Use this to paginate upwards: take the highest seen TR and pass that back through this field to continue scrolling. If set, the search order is reversed (returning the lowest items that match the query)

          • Optional limit: number

            The amount of entries to return, between 1 and 100. 50 by default.

          • Optional country: string

            The ISO 3166-1 country code to filter to. Leave unset to not filter by country.

          Returns Promise<LeagueLeaderboardUserInfoType[]>

          Description

          An array of all users fulfilling the search criteria. Please do not overuse this.

    • leagueFull: ((country?) => Promise<LeagueLeaderboardUserInfoType[]>)
        • (country?): Promise<LeagueLeaderboardUserInfoType[]>
        • Parameters

          • Optional country: string

            The ISO 3166-1 country code to filter to. Leave unset to not filter by country.

          Returns Promise<LeagueLeaderboardUserInfoType[]>

          Description

          An array of all users fulfilling the search criteria. Please do not overuse this.

  • misc: {
        allNews: ((limit?) => Promise<LatestNewsType[]>);
        news: ((stream, limit?) => Promise<LatestNewsType[]>);
        stream: ((stream) => Promise<RecordType[]>);
    }
    • allNews: ((limit?) => Promise<LatestNewsType[]>)
        • (limit?): Promise<LatestNewsType[]>
        • Parameters

          • Optional limit: number

            The amount of entries to return, between 1 and 100. 25 by default.

          Returns Promise<LatestNewsType[]>

          Description

          The latest news items in any stream.

    • news: ((stream, limit?) => Promise<LatestNewsType[]>)
        • (stream, limit?): Promise<LatestNewsType[]>
        • Parameters

          • stream: "40l_global" | `40l_global_${string}` | "40l_userbest" | `40l_userbest_${string}` | "40l_userrecent" | `40l_userrecent_${string}` | "blitz_global" | `blitz_global_${string}` | "blitz_userbest" | `blitz_userbest_${string}` | "blitz_userrecent" | `blitz_userrecent_${string}` | "any_global" | `any_global_${string}` | "any_userbest" | `any_userbest_${string}` | "any_userrecent" | `any_userrecent_${string}`

            The stream ID to look up.

          • Optional limit: number

            The amount of entries to return, between 1 and 100. 25 by default.

          Returns Promise<LatestNewsType[]>

          Description

          The latest news items in the stream. Use stream "global" for the global news.

    • stream: ((stream) => Promise<RecordType[]>)
        • (stream): Promise<RecordType[]>
        • Parameters

          • stream: "40l_global" | `40l_global_${string}` | "40l_userbest" | `40l_userbest_${string}` | "40l_userrecent" | `40l_userrecent_${string}` | "blitz_global" | `blitz_global_${string}` | "blitz_userbest" | `blitz_userbest_${string}` | "blitz_userrecent" | `blitz_userrecent_${string}` | "any_global" | `any_global_${string}` | "any_userbest" | `any_userbest_${string}` | "any_userrecent" | `any_userrecent_${string}`

            The stream ID to look up.

          Returns Promise<RecordType[]>

          Description

          The records in this Stream. A Stream is a list of records with a set length. Replays that are not featured in any Stream are automatically pruned.

  • users: {
        info: ((user) => Promise<UserInfoType>);
        records: ((user) => Promise<UserRecordsType>);
        search: ((query) => Promise<UserSearchType | undefined>);
    }
    • info: ((user) => Promise<UserInfoType>)
        • (user): Promise<UserInfoType>
        • Parameters

          • user: string

            The username or user ID to look up.

          Returns Promise<UserInfoType>

          Description

          An object describing the user in detail.

    • records: ((user) => Promise<UserRecordsType>)
        • (user): Promise<UserRecordsType>
        • Parameters

          • user: string

            The username or user ID to look up.

          Returns Promise<UserRecordsType>

          Description

          An object describing the user in detail.

    • search: ((query) => Promise<UserSearchType | undefined>)
        • (query): Promise<UserSearchType | undefined>
        • Parameters

          • query: string

            The Discord ID (snowflake) to look up.

          Returns Promise<UserSearchType | undefined>

          Description

          An object describing the user found, or undefined if none found.

Generated using TypeDoc