moons-ta-client
    Preparing search index...

    Class TAClient

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    addAuthorizedUser: (
        tournamentId: string,
        discordId: string,
        roleIds: string[],
    ) => Promise<Response>
    addQualifierMaps: (
        tournamentId: string,
        qualifierId: string,
        maps: Map[],
    ) => Promise<Response>
    addServer: (server: CoreServer, authToken?: string) => Promise<Response>
    addTournamentPool: (
        tournamentId: string,
        name: string,
        image: Uint8Array,
        maps: Map[],
    ) => Promise<Response>
    addTournamentPoolMaps: (
        tournamentId: string,
        poolId: string,
        maps: Map[],
    ) => Promise<Response>
    addTournamentRole: (tournamentId: string, role: Role) => Promise<Response>
    addTournamentTeam: (
        tournamentId: string,
        name: string,
        image: Uint8Array,
    ) => Promise<Response>
    addUserToMatch: (
        tournamentId: string,
        matchId: string,
        userId: string,
    ) => Promise<Response>
    createMatch: (tournamentId: string, match: Match) => Promise<Response>
    createQualifierEvent: (
        tournamentId: string,
        name: string,
        infoChannelId: string,
        maps: Map[],
        flags: QualifierEvent_EventSettings,
        sort: QualifierEvent_LeaderboardSort,
        qualifierImage: Uint8Array,
    ) => Promise<Response>
    createTournament: (
        serverAddress: string,
        serverName: string,
        serverPort: string,
        serverWebsocketPort: string,
        name: string,
        tournamentImage?: Uint8Array,
        enableTeams?: boolean,
        enablePools?: boolean,
        showTournamentButton?: boolean,
        showQualifierButton?: boolean,
        roles?: Role[],
        teams?: Tournament_TournamentSettings_Team[],
        scoreUpdateFrequency?: number,
        bannedMods?: string[],
        pools?: Tournament_TournamentSettings_Pool[],
        allowUnauthorizedView?: boolean,
    ) => Promise<Response>
    delayTestFinished: (tournamentId: string, userIds: string[]) => void
    deleteMatch: (tournamentId: string, matchId: string) => Promise<Response>
    deleteQualifierEvent: (
        tournamentId: string,
        qualifierId: string,
    ) => Promise<Response>
    deleteTournament: (tournamentId: string) => Promise<Response>
    disableBlueNotes: (tournamentId: string, userIds: string[]) => void
    disableRedNotes: (tournamentId: string, userIds: string[]) => void
    flipColors: (tournamentId: string, userIds: string[]) => void
    flipHands: (tournamentId: string, userIds: string[]) => void
    generateBotToken: (username: string) => Promise<Response>
    getAuthorizedUsers: (tournamentId: string) => Promise<Response>
    getBotTokensForUser: (ownerDiscordId: string) => Promise<Response>
    getDiscordInfo: (tournamentId: string, discordId: string) => Promise<Response>
    getLeaderboard: (
        tournamentId: string,
        qualifierId: string,
        mapId: string,
    ) => Promise<Response>
    joinTournament: (tournamentId: string) => Promise<Response>
    loadImage: (
        tournamentId: string,
        bitmap: Uint8Array,
        userIds: string[],
    ) => Promise<ResponseFromUser[]>
    loadSong: (
        tournamentId: string,
        levelId: string,
        userIds: string[],
        timeout?: number,
    ) => Promise<ResponseFromUser[]>
    playSong: (
        tournamentId: string,
        gameplayParameters: GameplayParameters,
        userIds: string[],
    ) => void
    refundAttempts: (
        tournamentId: string,
        qualifierId: string,
        mapId: string,
        platformId: string,
        count: number,
    ) => Promise<ResponseFromUser[]>
    removeAuthorizedUser: (
        tournamentId: string,
        discordId: string,
    ) => Promise<Response>
    removeQualifierMap: (
        tournamentId: string,
        qualifierId: string,
        mapId: string,
    ) => Promise<Response>
    removeTournamentPool: (
        tournamentId: string,
        poolId: string,
    ) => Promise<Response>
    removeTournamentPoolMap: (
        tournamentId: string,
        poolId: string,
        mapId: string,
    ) => Promise<Response>
    removeTournamentRole: (
        tournamentId: string,
        roleId: string,
    ) => Promise<Response>
    removeTournamentTeam: (
        tournamentId: string,
        teamId: string,
    ) => Promise<Response>
    removeUserFromMatch: (
        tournamentId: string,
        matchId: string,
        userId: string,
    ) => Promise<Response>
    returnToMenu: (tournamentId: string, userIds: string[]) => void
    revokeBotToken: (botTokenGuid: string) => Promise<Response>
    setMatchLeader: (
        tournamentId: string,
        matchId: string,
        userId: string,
    ) => Promise<Response>
    setMatchMap: (
        tournamentId: string,
        matchId: string,
        map: Map,
    ) => Promise<Response>
    setQualifierFlags: (
        tournamentId: string,
        qualifierId: string,
        qualifierFlags: QualifierEvent_EventSettings,
    ) => Promise<Response>
    setQualifierImage: (
        tournamentId: string,
        qualifierId: string,
        qualifierImage: Uint8Array,
    ) => Promise<Response>
    setQualifierInfoChannel: (
        tournamentId: string,
        qualifierId: string,
        infoChannel: Channel,
    ) => Promise<Response>
    setQualifierLeaderboardSort: (
        tournamentId: string,
        qualifierId: string,
        qualifierLeaderboardSort: QualifierEvent_LeaderboardSort,
    ) => Promise<Response>
    setQualifierName: (
        tournamentId: string,
        qualifierId: string,
        qualifierName: string,
    ) => Promise<Response>
    setTournamentAllowUnauthorizedView: (
        tournamentId: string,
        allowUnauthorizedView: boolean,
    ) => Promise<Response>
    setTournamentBannedMods: (
        tournamentId: string,
        bannedMods: string[],
    ) => Promise<Response>
    setTournamentEnablePools: (
        tournamentId: string,
        enablePools: boolean,
    ) => Promise<Response>
    setTournamentEnableTeams: (
        tournamentId: string,
        enableTeams: boolean,
    ) => Promise<Response>
    setTournamentImage: (
        tournamentId: string,
        tournamentImage: Uint8Array,
    ) => Promise<Response>
    setTournamentName: (
        tournamentId: string,
        tournamentName: string,
    ) => Promise<Response>
    setTournamentPoolImage: (
        tournamentId: string,
        poolId: string,
        image: Uint8Array,
    ) => Promise<Response>
    setTournamentPoolName: (
        tournamentId: string,
        poolId: string,
        poolName: string,
    ) => Promise<Response>
    setTournamentRoleName: (
        tournamentId: string,
        roleId: string,
        roleName: string,
    ) => Promise<Response>
    setTournamentRolePermissions: (
        tournamentId: string,
        roleId: string,
        permissions: string[],
    ) => Promise<Response>
    setTournamentScoreUpdateFrequency: (
        tournamentId: string,
        scoreUpdateFrequency: number,
    ) => Promise<Response>
    setTournamentShowQualifierButton: (
        tournamentId: string,
        showQualifierButton: boolean,
    ) => Promise<Response>
    setTournamentShowTournamentButton: (
        tournamentId: string,
        showTournamentButton: boolean,
    ) => Promise<Response>
    setTournamentTeamImage: (
        tournamentId: string,
        teamId: string,
        teamImage: Uint8Array,
    ) => Promise<Response>
    setTournamentTeamName: (
        tournamentId: string,
        teamId: string,
        teamName: string,
    ) => Promise<Response>
    showColor: (tournamentId: string, color: string, userIds: string[]) => void
    showLoadedImage: (
        tournamentId: string,
        userIds: string[],
        show?: boolean,
    ) => void
    showPrompt: (
        tournamentId: string,
        userIds: string[],
        titleText: string,
        bodyText: string,
        canClose: boolean,
        options: Request_ShowPrompt_PromptOption[],
        timer?: number,
    ) => Promise<ResponseFromUser[]>
    stateManager: StateManager
    updateQualifierMap: (
        tournamentId: string,
        qualifierId: string,
        map: Map,
    ) => Promise<Response>
    updateTournamentPoolMap: (
        tournamentId: string,
        poolId: string,
        map: Map,
    ) => Promise<Response>
    updateUser: (tournamentId: string, user: User) => Promise<Response>

    Accessors

    • get emit(): <K extends string | symbol>(eventName: K, params: T[K]) => void

      Returns <K extends string | symbol>(eventName: K, params: T[K]) => void

    • get isConnected(): boolean

      Returns boolean

    • get isConnecting(): boolean

      Returns boolean

    • get on(): <K extends string | symbol>(
          eventName: K,
          fn: (params: T[K]) => void,
      ) => void

      Returns <K extends string | symbol>(eventName: K, fn: (params: T[K]) => void) => void

    • get once(): <K extends string | symbol>(
          eventName: K,
          fn: (params: T[K]) => void,
      ) => void

      Returns <K extends string | symbol>(eventName: K, fn: (params: T[K]) => void) => void

    • get removeListener(): <K extends string | symbol>(
          eventName: K,
          fn: (params: T[K]) => void,
      ) => void

      Returns <K extends string | symbol>(eventName: K, fn: (params: T[K]) => void) => void

    Methods

    • Parameters

      • serverAddress: string
      • port: string

      Returns Promise<Response>

    • Returns void

    • Parameters

      Returns Promise<void>

    • Parameters

      • token: string

      Returns void