Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

@grammyjs/auto-retry

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grammyjs/auto-retry

grammY API transformer function to retry requests

latest
Source
npmnpm
Version
2.0.2
Version published
Weekly downloads
9.2K
-26.28%
Maintainers
1
Weekly downloads
 
Created
Source

Automatically Retry grammY API Requests

Check out the official documentation for this grammY plugin. You might also want to read about broadcasting messages.

Quickstart

An API transformer function lets you modify outgoing HTTP requests on the fly. This grammY plugin can automatically detect if an API requests fails with a retry_after value. It will then intercept the error, wait the specified period of time, and then retry the request.

import { autoRetry } from "@grammyjs/auto-retry";

// Install the plugin
bot.api.config.use(autoRetry());

You can also pass an options object to configure this plugin. Check out the docs to read on.

Keywords

retry

FAQs

Package last updated on 30 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts