Available methods

editChatSubscriptionInviteLink()

Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights. Returns the edited invite link as a ChatInviteLink object.

parameters

parametertyperequireddescription
chat_idnumber | stringrequiredUnique identifier for the target chat or username of the target channel in the format @username
invite_linkstringrequiredThe invite link to edit
namestringoptionalInvite link name; 0-32 characters

returns

ChatInviteLink

usage in yaebal

not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.

bot.ts
import type { ChatInviteLink, EditChatSubscriptionInviteLinkParams } from "@yaebal/types";

await bot.api.call<ChatInviteLink>("editChatSubscriptionInviteLink", {
  chat_id: 123456789,
  invite_link: "...",
} satisfies EditChatSubscriptionInviteLinkParams);

context shortcut

also available as ctx.editChatSubscriptionInviteLink() on 16 context types — see @yaebal/contexts.

context shortcut
/** Use this method to edit a subscription invite link created by the bot. The bot must have the *can\_invite\_users* administrator rights. Returns the edited invite link as a [ChatInviteLink](https://core.telegram.org/bots/api/#chatinvitelink) object. */
ctx.editChatSubscriptionInviteLink(params: Omit<EditChatSubscriptionInviteLinkParams, "chat_id">)