Outcome ('approve', 'decline', or 'queue')
OptionalqueryId: stringOptional query ID. If omitted, resolved from the update.
Promise<boolean>
Approve a request to join the chat
User ID
Promise<boolean>
Approve a suggested post to publish it in the channel
OptionalmessageId: numberSuggested post message ID. If omitted, resolved from the update.
Optionaloptions: Omit<ApproveSuggestedPostParams, "chat_id" | "message_id">Additional parameters
Promise<boolean>
Ban a user from the channel (kick and block)
User ID
Optionaloptions: Omit<BanChatMemberParams, "chat_id" | "user_id">Additional ban settings (e.g. until_date)
Promise<boolean>
Ban a channel from posting comments/interacting (spammers)
Sender channel ID to ban
Optionaloptions: Omit<BanChatSenderChatParams, "chat_id" | "sender_chat_id">Additional parameters
Promise<boolean>
Create an additional invite link
Optionaloptions: Omit<CreateChatInviteLinkParams, "chat_id">Additional parameters
Promise<ChatInviteLink>
Create a subscription invite link for the channel (recurrent payment in Stars)
Period in seconds (currently 2592000 for 30 days)
Amount of Stars per period
Optionaloptions: Omit<Additional parameters
Promise<ChatInviteLink>
Decline a request to join the chat
User ID
Promise<boolean>
Decline a suggested post
OptionalmessageId: numberSuggested post message ID. If omitted, resolved from the update.
Optionaloptions: Omit<DeclineSuggestedPostParams, "chat_id" | "message_id">Additional parameters
Promise<boolean>
Delete a post from the channel
OptionalmessageId: numberMessage ID to delete. If omitted, resolved from the update.
Promise<boolean>
Delete multiple messages from the channel
Array of message IDs
Promise<boolean>
Edit an invite link created by the bot
Invite link to edit
Optionaloptions: Omit<EditChatInviteLinkParams, "chat_id" | "invite_link">Additional parameters
Promise<ChatInviteLink>
Edit the caption of a message
New message caption
OptionalmessageId: numberMessage ID to edit. If omitted, resolved from the update.
Optionaloptions: Omit<EditMessageCaptionParams, "caption" | "chat_id" | "message_id">Additional parameters
Promise<Message | boolean>
Edit the media elements of a message
New media content
OptionalmessageId: numberMessage ID to edit. If omitted, resolved from the update.
Optionaloptions: Omit<EditMessageMediaParams, "chat_id" | "message_id" | "media">Additional parameters
Promise<Message | boolean>
Edit the text of a message
New message text
OptionalmessageId: numberMessage ID to edit. If omitted, resolved from the update.
Optionaloptions: Omit<EditMessageTextParams, "text" | "chat_id" | "message_id">Additional parameters
Promise<Message | boolean>
Edit a subscription invite link
Invite link to edit
Optionaloptions: Omit<EditChatSubscriptionInviteLinkParams, "chat_id" | "invite_link">Additional parameters
Promise<ChatInviteLink>
Export the chat invite link
Promise<string>
Get the number of members in the channel.
Promise<number>
Pin a message in the channel header
OptionalmessageId: numberMessage ID to pin. If omitted, resolved from the update.
Optionaloptions: Omit<PinChatMessageParams, "chat_id" | "message_id">Additional parameters
Promise<boolean>
Promote or demote a user in the channel (manage administrators)
User ID
Optionaloptions: Omit<PromoteChatMemberParams, "chat_id" | "user_id">Administrator permissions
Promise<boolean>
Revoke an invite link created by the bot
Invite link to revoke
Promise<ChatInviteLink>
Send an animation/GIF
Animation URL or file_id
Optionaloptions: Omit<SendAnimationParams, "chat_id" | "animation">Additional parameters
Promise<Message>
Send an audio file
Audio URL or file_id
Optionaloptions: Omit<SendAudioParams, "chat_id" | "audio">Additional parameters
Promise<Message>
Show a Mini App to the user before deciding on their join request
Mini App URL to be opened
OptionalqueryId: stringOptional query ID. If omitted, resolved from the update.
Promise<boolean>
Send a document/file
Document URL or file_id
Optionaloptions: Omit<SendDocumentParams, "chat_id" | "document">Additional parameters
Promise<Message>
Send a group of photos or videos as an album
Array of media items
Optionaloptions: Omit<SendMediaGroupParams, "chat_id" | "media">Additional parameters
Promise<Message[]>
Send a text message to the channel
Message text
Optionaloptions: Omit<SendMessageParams, "text" | "chat_id">Additional parameters
Promise<Message>
Send a photo to the channel
Photo URL or file_id
Optionaloptions: Omit<SendPhotoParams, "chat_id" | "photo">Additional parameters
Promise<Message>
Send a rich message using HTML or Markdown
The rich message options
Optionaloptions: Omit<SendRichMessageParams, "chat_id" | "rich_message">Additional parameters
Promise<Message>
Send a video to the channel
Video URL or file_id
Optionaloptions: Omit<SendVideoParams, "chat_id" | "video">Additional parameters
Promise<Message>
Send a voice message
Voice URL or file_id
Optionaloptions: Omit<SendVoiceParams, "chat_id" | "voice">Additional parameters
Promise<Message>
Unban a user from the channel
User ID
Optionaloptions: Omit<UnbanChatMemberParams, "chat_id" | "user_id">Additional parameters
Promise<boolean>
Unban a previously banned channel
Sender channel ID to unban
Promise<boolean>
Unpin all pinned messages in the channel
Promise<boolean>
Unpin a message from the channel header
OptionalmessageId: numberOptional message ID to unpin. If omitted, the latest pinned message is unpinned.
Promise<boolean>
Process a received chat join request query