Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/grammy/mod.ts>Api#close

The Telegram Bot Framework.
Very Popular
Go to Latest
method Api.prototype.close
import { Api } from "https://deno.land/x/grammy@v1.31.2/mod.ts";

Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns True on success. Requires no parameters.

Parameters

optional
signal: AbortSignal

Optional AbortSignal to cancel the request

Official reference: https://core.telegram.org/bots/api#close