Discord.https - v3.0.16
    Preparing search index...

    Type Alias UnknownMiddleware<T>

    UnknownMiddleware: (
        interaction: T,
        client: Readonly<default>,
        flush: () => never,
        res: HttpAdapterSererResponse,
    ) => Promise<void>

    A middleware type for interactions that the library does not explicitly cover.

    Type Parameters

    Type Declaration

      • (
            interaction: T,
            client: Readonly<default>,
            flush: () => never,
            res: HttpAdapterSererResponse,
        ): Promise<void>
      • Parameters

        • interaction: T

          The raw Discord HTTPS API interaction.

        • client: Readonly<default>

          A read-only Client instance.

        • flush: () => never

          A function you can call to immediately stop further middleware execution and end the request. Ends the middleware chain immediately. Calling flush() stops further middleware.

        • res: HttpAdapterSererResponse

          res should be provided to unknown middlewares only, as UnknownMiddleware is meant to be used when the library does not yet cover a specific interaction.

        Returns Promise<void>