• Randomly produces a delay before executing next middleware. Delay chance is dictated by 'chancePercentage' parameter.

    Parameters

    • chancePercentage: number

      chance in percentage for delay to happen. 0 - delay will not happen, 100 or higher - delay will happen 100%

    • maxDelayInSeconds: number = 2

      optional, default value is 2 seconds.

    Returns OnMessageMiddleware<unknown>

Generated using TypeDoc