discord-mcbe
    Preparing search index...

    Interface ISession

    interface ISession {
        averagePing: number;
        id: string;
        requestInfo: ConnectionInfo;
        worldName: string;
        destroy(): void;
        disconnect(reason?: DisconnectReason): Promise<void>;
        send<
            T extends
                | Disconnect
                | Ping
                | SendMessage
                | RunCommand
                | SendScriptEvent
                | GetTPS
                | GetEntityLocation
                | GetEntityDimension
                | GetGameMode
                | SetGameMode
                | SetTitle
                | UpdateSubtitle
                | SetActionBar
                | KickPlayer
                | DiscordChat
                | GetScore
                | UpdateScore
                | GetAllScores
                | RemoveParticipant
                | GetObjective
                | GetAllObjectives
                | UpdateObjective
                | SetObjectiveDisplay,
        >(
            type: T,
            data: ClientBoundRequestData<T>,
            timeout?: number,
        ): Promise<RequestResult<ClientBoundResponseData<T>>>;
    }

    Implemented by

    Index
    averagePing: number
    id: string
    requestInfo: ConnectionInfo
    worldName: string
    • Type Parameters

      • T extends
            | Disconnect
            | Ping
            | SendMessage
            | RunCommand
            | SendScriptEvent
            | GetTPS
            | GetEntityLocation
            | GetEntityDimension
            | GetGameMode
            | SetGameMode
            | SetTitle
            | UpdateSubtitle
            | SetActionBar
            | KickPlayer
            | DiscordChat
            | GetScore
            | UpdateScore
            | GetAllScores
            | RemoveParticipant
            | GetObjective
            | GetAllObjectives
            | UpdateObjective
            | SetObjectiveDisplay

      Parameters

      • type: T
      • data: ClientBoundRequestData<T>
      • Optionaltimeout: number

      Returns Promise<RequestResult<ClientBoundResponseData<T>>>