revokeChatInviteLink()
Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object.
parameters
| parameter | type | required | description |
|---|---|---|---|
chat_id | number | string | required | Unique identifier of the target chat or username of the target channel in the format @username |
invite_link | string | required | The invite link to revoke |
returns
usage in yaebal
not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.
import type { ChatInviteLink, RevokeChatInviteLinkParams } from "@yaebal/types";
await bot.api.call<ChatInviteLink>("revokeChatInviteLink", {
chat_id: 123456789,
invite_link: "...",
} satisfies RevokeChatInviteLinkParams);context shortcut
also available as ctx.revokeChatInviteLink() on
16
context types — see @yaebal/contexts.
/** Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as [ChatInviteLink](https://core.telegram.org/bots/api/#chatinvitelink) object. */
ctx.revokeChatInviteLink(params: Omit<RevokeChatInviteLinkParams, "chat_id">)official Bot API docs: https://core.telegram.org/bots/api/#revokechatinvitelink