import { Context } from "https://dotland.deno.dev/x/grammy@v1.10.0/context.ts";
Context-aware alias for api.exportChatInviteLink
. Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success.
Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink or by calling the getChat method. If your bot needs to generate a new primary invite link replacing its previous one, use exportChatInviteLink again.
Parameters
Optional AbortSignal
to cancel the request
Official reference: https://core.telegram.org/bots/api#exportchatinvitelink