'use strict'; var gramio = require('gramio'); function autoRetry() { return new gramio.Plugin("@gramio/auto-retry").onResponseError( async (error, api) => { if (error.payload?.retry_after) { setTimeout( //@ts-expect-error () => api[error.method](error.params), error.payload.retry_after * 1e3 ); } } ); } exports.autoRetry = autoRetry;