Class REST/Lobbies

Various methods for interacting with lobbies. Located at Client#rest.lobbies.

Constructors

Methods

  • Create an invite for the current user to join a lobby's linked channel. This requires bearer token authentication.

    Parameters

    • lobbyID: string

      The ID of the lobby to create the invite for.

    • Optional accessToken: string

      An optional access token to use instead of the client's token. This overrides the client's auth.

    Returns Promise<LobbyInvite>

  • Create an invite for a user to join a lobby's linked channel. This requires bearer token authentication.

    Parameters

    • lobbyID: string

      The ID of the lobby to create the invite for.

    • userID: string

      The ID of the user to create the invite for.

    • Optional accessToken: string

      An optional access token to use instead of the client's token. This overrides the client's auth.

    Returns Promise<LobbyInvite>

  • Create a message in a lobby. This requires bearer token authentication.

    Parameters

    • lobbyID: string

      The ID of the lobby to create the message in.

    • options: CreateLobbyMessageOptions

      The options for creating the message.

    • Optional accessToken: string

      An optional access token to use instead of the client's token. This overrides the client's auth.

    Returns Promise<LobbyMessage>

  • Get messages in a lobby. This requires bearer token authentication.

    Parameters

    • lobbyID: string

      The ID of the lobby to get messages from.

    • Optional options: GetLobbyMessagesOptions

      The options for getting the messages.

    • Optional accessToken: string

      An optional access token to use instead of the client's token. This overrides the client's auth.

    Returns Promise<LobbyMessage[]>

  • Leave a lobby. This requires bearer token authentication.

    Parameters

    • lobbyID: string

      The ID of the lobby to leave.

    • Optional accessToken: string

      An optional access token to use instead of the client's token. This overrides the client's auth.

    Returns Promise<void>

  • Link a lobby to a channel. This requires bearer token authentication and the CAN_LINK_LOBBY flag on the member.

    Parameters

    • lobbyID: string

      The ID of the lobby to link the channel to.

    • channelID: undefined | string

      The ID of the channel to link the lobby to.

    • Optional accessToken: string

      An optional access token to use instead of the client's token. This overrides the client's auth.

    Returns Promise<Lobby>

  • Remove a member from a lobby.

    Parameters

    • lobbyID: string

      The ID of the lobby to remove the member from.

    • userID: string

      The ID of the user to remove from the lobby.

    Returns Promise<void>

  • Unlink a lobby from a channel. This requires bearer token authentication and the CAN_LINK_LOBBY flag on the member.

    Parameters

    • lobbyID: string

      The ID of the lobby to unlink the channel from.

    • Optional accessToken: string

      An optional access token to use instead of the client's token. This overrides the client's auth.

    Returns Promise<Lobby>

  • Update the moderation metadata for a message in a lobby.

    Parameters

    • lobbyID: string

      The ID of the lobby the message is in.

    • messageID: string

      The ID of the message to update the metadata for.

    • metadata: Record<string, string>

      The metadata to set for the message.

    Returns Promise<void>