editChatInviteLink()
Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink object.
parameters
| parameter | type | required | description |
|---|---|---|---|
chat_id | number | string | required | Unique identifier for the target chat or username of the target channel in the format @username |
invite_link | string | required | The invite link to edit |
name | string | optional | Invite link name; 0-32 characters |
expire_date | number | optional | Point in time (Unix timestamp) when the link will expire |
member_limit | number | optional | The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 |
creates_join_request | boolean | optional | True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified. |
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, EditChatInviteLinkParams } from "@yaebal/types";
await bot.api.call<ChatInviteLink>("editChatInviteLink", {
chat_id: 123456789,
invite_link: "...",
} satisfies EditChatInviteLinkParams);context shortcut
also available as ctx.editChatInviteLink() on
16
context types — see @yaebal/contexts.
/** Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a [ChatInviteLink](https://core.telegram.org/bots/api/#chatinvitelink) object. */
ctx.editChatInviteLink(params: Omit<EditChatInviteLinkParams, "chat_id">)official Bot API docs: https://core.telegram.org/bots/api/#editchatinvitelink