Class StageInstanceMethods

Methods for interacting with Stage instances

Hierarchy

  • StageInstanceMethods

Constructors

  • Create a new Stage Instance Method Handler

    Usually SnowTransfer creates a method handler for you, this is here for completion

    You can access the methods listed via client.stageInstance.method, where client is an initialized SnowTransfer instance

    Parameters

    • requestHandler: RequestHandler

      request handler that calls the rest api

    Returns StageInstanceMethods

Methods

  • Creates a new stage instance associated to a stage channel

    Returns

    a stage instance object

    Permissions needed Condition
    MANAGE_CHANNELS always
    MUTE_MEMBERS always
    MOVE_MEMBERS always

    Example

    // Create a new stage instance for channel id and the topic "This My House"
    const client = new SnowTransfer("TOKEN")
    const instance = await client.stageInstance.createStageInstance({ channel_id: "channel id", topic: "This My House" })

    Parameters

    • data: {
          channel_id: string;
          privacy_level?: PrivacyLevel;
          reason?: string;
          send_start_notification?: boolean;
          topic: string;
      }

      The options for creating a stage instance

      • channel_id: string
      • Optional privacy_level?: PrivacyLevel
      • Optional reason?: string
      • Optional send_start_notification?: boolean
      • topic: string

    Returns Promise<StageInstance>

  • Delete an existing stage instance

    Returns

    a stage instance object

    Permissions needed Condition
    MANAGE_CHANNELS always
    MUTE_MEMBERS always
    MOVE_MEMBERS always

    Example

    const client = new SnowTransfer("TOKEN")
    client.stageInstance.deleteStageInstance("channel id", "They already know who's house this is")

    Parameters

    • channelId: string

      Id of the stage channel

    • Optional reason: string

    Returns Promise<void>

  • Updates an existing stage instance

    Returns

    a stage instance object

    Permissions needed Condition
    MANAGE_CHANNELS always
    MUTE_MEMBERS always
    MOVE_MEMBERS always

    Example

    const client = new SnowTransfer("TOKEN")
    const instance = await client.stageInstance.updateStageInstance("channel id", { topic: "This my city, this my town" })

    Parameters

    • channelId: string

      Id of the stage channel

    • data: {
          privacy_level?: PrivacyLevel;
          reason?: string;
          topic: string;
      }

      The new data to send

      • Optional privacy_level?: PrivacyLevel
      • Optional reason?: string
      • topic: string

    Returns Promise<StageInstance>

  • Gets the stage instance assocuated to a stage channel if it exists

    Returns

    a stage instance object

    Example

    const client = new SnowTransfer("TOKEN")
    const instance = await client.stageInstance.getStageInstance("channel id")

    Parameters

    • channelId: string

      Id of the stage channel

    Returns Promise<StageInstance>

Properties

requestHandler: RequestHandler

Generated using TypeDoc